Commit 871b0414 authored by Daniele Venzano's avatar Daniele Venzano

Fix sonarqube warnings

parent 851b9d92
......@@ -98,7 +98,7 @@ def start_batches(zapp, log):
continue
to_start_now = random.randint(1, MAX_TO_START_PER_LOOP)
print('Will submit {} new zapps'.format(to_start_now))
for i in range(to_start_now):
for i_ in range(to_start_now):
zapp_id = submit_zapp(zapp)
zapps_to_start -= 1
print("ZApp submitted with ID {}, queue length {}, {} zapps to go".format(zapp_id, queue_length, zapps_to_start))
......@@ -126,7 +126,7 @@ def keep_some_running(zapp):
zapps_to_start = TOTAL_JOBS - running_zapps
print('I need to start {} zapps ({} running)'.format(zapps_to_start, running_zapps))
if zapps_to_start > 0:
for i in range(zapps_to_start):
for i_ in range(zapps_to_start):
queue_length = check_queue_length()
zapp_id = submit_zapp(zapp)
print("ZApp submitted with ID {}, queue length {}, {} zapps to go".format(zapp_id, queue_length, zapps_to_start))
......
......@@ -14,7 +14,7 @@ def zookeeper_swarm(zk_server_list, path='/swarm'):
path += '/docker/swarm/leader'
zk = KazooClient(hosts=zk_server_list)
zk.start()
master, stat = zk.get(path)
master, stat_ = zk.get(path)
zk.stop()
return master.decode('utf-8')
......
......@@ -36,6 +36,7 @@ from zoe_lib.applications import app_validate
def _log_stream_stdout(service_id, timestamps):
"""Stream the log on the standard output."""
service_api = ZoeServiceAPI(utils.zoe_url(), utils.zoe_user(), utils.zoe_pass())
try:
for line in service_api.get_logs(service_id):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment