libkas: Fix false positive of pylint

As suggested by Claudius Heine, reorder the blocks so that we can add
the pylint exception to the if half.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2017-07-07 12:59:25 +02:00 committed by Daniel Wagner
parent f10718043e
commit 8e3862112c

View File

@ -210,10 +210,11 @@ def repos_fetch(config, repos):
"""
tasks = []
for repo in repos:
if hasattr(asyncio, 'ensure_future'):
task = asyncio.ensure_future(_repo_fetch_async(config, repo))
else:
if not hasattr(asyncio, 'ensure_future'):
# pylint: disable=no-member,deprecated-method
task = asyncio.async(_repo_fetch_async(config, repo))
else:
task = asyncio.ensure_future(_repo_fetch_async(config, repo))
tasks.append(task)
loop = asyncio.get_event_loop()