Fix VMMgr URL compilation

This commit is contained in:
Disassembler 2018-09-17 16:12:17 +02:00
parent 22fa90d785
commit b0fe54d034
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -13,7 +13,7 @@ import subprocess
NULL_IP = '[100::1]'
def compile_url(domain, port, proto='https'):
port = ':{}'.format(port) if (proto == 'https' and port != '443') or (proto == 'http' and port != '80') else ''
port = '' if (proto == 'https' and port == '443') or (proto == 'http' and port == '80') else ':{}'.format(port)
host = '{}{}'.format(domain, port)
return '{}://{}'.format(proto, host) if proto is not None else host