Skip to content
Snippets Groups Projects
Commit a8a0f9af authored by Florent Thiery's avatar Florent Thiery
Browse files

fix typo, refs #20809

parent ac988bd4
No related branches found
No related tags found
No related merge requests found
...@@ -79,11 +79,12 @@ def check_mediaworker_in_whitelist(ip): ...@@ -79,11 +79,12 @@ def check_mediaworker_in_whitelist(ip):
vhosts = os.listdir(nginx_vhosts_path) vhosts = os.listdir(nginx_vhosts_path)
for v in vhosts: for v in vhosts:
if v.endswith('.conf'): if v.endswith('.conf'):
with f as open(os.path.join(nginx_vhosts_path, v), 'r'): vhost_path = os.path.join(nginx_vhosts_path, v)
with open(vhost_path, 'r') as f:
d = f.read() d = f.read()
if 'msuser_whitelist' in d: if 'msuser_whitelist' in d:
if not ip in d: if not ip in d:
print('MediaWorker ip is not in %s whitelist' % v) print('MediaWorker ip is not in %s whitelist' % (ip, v))
return False return False
return True return True
......
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