if remotes:
need_reconnect = remotes
else:
- need_reconnect = ctx.cluster.remotes.keys()
+ need_reconnect = list(ctx.cluster.remotes.keys())
while need_reconnect:
for remote in need_reconnect:
ret = target
else:
if should_unlock:
- unlock_one(ctx, target.keys()[0], ctx.owner)
+ unlock_one(ctx, list(target.keys())[0], ctx.owner)
return ret
If there are missing packages, fail the job.
"""
for task in ctx.config['tasks']:
- if task.keys()[0] == 'buildpackages':
+ if list(task.keys())[0] == 'buildpackages':
log.info("Checking packages skipped because "
"the task buildpackages was found.")
return
return BUILDPACKAGES_OK
elif buildpackages_index is not None and install_index is None:
ctx.config['tasks'].pop(buildpackages_index)
- all_tasks = [x.keys()[0] for x in ctx.config['tasks']]
+ all_tasks = [list(x.keys())[0] for x in ctx.config['tasks']]
log.info('buildpackages removed because no install task found in ' +
str(all_tasks))
return BUILDPACKAGES_REMOVED
"""
Look for virtual machines and handle their initialization
"""
- all_tasks = [x.keys()[0] for x in ctx.config['tasks']]
+ all_tasks = [list(x.keys())[0] for x in ctx.config['tasks']]
need_ansible = False
if 'kernel' in all_tasks and 'ansible.cephlab' not in all_tasks:
need_ansible = True
starttime = time.time()
while need_install:
teuthology.reconnect(ctx, timeout)
- for client in need_install.keys():
+ for client in list(need_install.keys()):
if 'distro' in str(need_install[client]):
distro = True
log.info('Checking client {client} for new kernel version...'.format(client=client))