Skip to content
Snippets Groups Projects
Commit b83fabd9 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

PEP8 again...

parent b4544d92
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,7 @@ def check_celerity_connectivity(ip):
print('%sFailed to reach tasks server from MediaWorker "%s".%s' % (RED, ip, DEF))
return False
def check_mediaworker_in_whitelist(ip):
nginx_vhosts_path = '/etc/nginx/sites-enabled'
vhosts = os.listdir(nginx_vhosts_path)
......@@ -83,7 +84,7 @@ def check_mediaworker_in_whitelist(ip):
with open(vhost_path, 'r') as f:
d = f.read()
if 'msuser_whitelist' in d:
if not ip in d:
if ip not in d:
print('%sMediaWorker ip %s is not in %s whitelist%s' % (RED, ip, v, DEF))
return False
return True
......@@ -101,8 +102,8 @@ for worker_ip in worker_ips.split(','):
else:
if not check_celerity_connectivity(worker_ip):
all_ok = False
#if not run_tests(worker_ip):
# all_ok = False
# if not run_tests(worker_ip):
# all_ok = False
if not check_mediaworker_in_whitelist(worker_ip):
all_ok = False
if not tested:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment