Fix VMMgr URL compilation
This commit is contained in:
parent
22fa90d785
commit
b0fe54d034
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user