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

PEP8

parent 308d9590
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ def setup(interactive=True):
"ms_apikey": utils.get_conf('MS_API_KEY')
}
cmd_template = "./publish_zip_by_url.py -w https://{ms_url} -u %s -a {ms_apikey}".format(**options)
#https://192.168.43.72/api/v2/search/?search=medical
# https://192.168.43.72/api/v2/search/?search=medical
for c in CONTENT:
cmd = cmd_template % c
cmds.append(cmd)
......
......@@ -67,9 +67,9 @@ if __name__ == '__main__':
else:
with open('/tmp/file.zip', 'wb') as f:
f.write(requests.get(args.url).content)
# add media with a zip
#print(msc.add_media('Test multichunk upload zip', file_path='/tmp/file.zip'))
print(msc.add_media(file_path='/tmp/file.zip'))
# add media with a zip
# print(msc.add_media('Test multichunk upload zip', file_path='/tmp/file.zip'))
print(msc.add_media(file_path='/tmp/file.zip'))
# add user
# print(msc.api('users/add/', method='post', data={'email': 'test@test.com'}))
......
......@@ -130,6 +130,7 @@ def check_mediaworker_in_whitelist(ip):
return False
return True
all_ok = True
tested = False
mediaserver_ip = conf.get('NETWORK_IP')
......
......@@ -351,6 +351,7 @@ def add_hosts_to_localhost(hosts: list):
else:
log('/etc/hosts is already up to date.')
OPENSSL_CONFIG_TEMPLATE = """
[ req ]
......@@ -391,6 +392,7 @@ subjectAltName = @alternate_names
"""
def mkcert(domains: list, ecc: bool = True, days: int = 3650, config_tpl: str = OPENSSL_CONFIG_TEMPLATE):
"""Generate a self-signed certificate for the domains list.
......@@ -420,7 +422,7 @@ def mkcert(domains: list, ecc: bool = True, days: int = 3650, config_tpl: str =
"-name", "secp384r1",
"-out", cert_dir + "/ecparam"
])
keytype = "ec:" + cert_dir + "/ecparam"
keytype = "ec:" + cert_dir + "/ecparam"
else:
keytype = "rsa"
# execute openssl to generate keypair
......
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