increase default timeout, fix flag arguments

This commit is contained in:
Jack Robison 2018-10-11 17:29:16 -04:00
parent 34e401b9a4
commit e562fdc4bb
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -46,7 +46,7 @@ def main():
'interface': 'default', 'interface': 'default',
'gateway_address': '', 'gateway_address': '',
'lan_address': '', 'lan_address': '',
'timeout': 1, 'timeout': 30,
'HOST': SSDP_HOST, 'HOST': SSDP_HOST,
'ST': UPNP_ORG_IGD, 'ST': UPNP_ORG_IGD,
@ -58,7 +58,10 @@ def main():
command = None command = None
for arg in args: for arg in args:
if arg.startswith("--"): if arg.startswith("--"):
k, v = arg.split("=") if "=" in arg:
k, v = arg.split("=")
else:
k, v = arg, True
k = k.lstrip('--') k = k.lstrip('--')
options[k] = v options[k] = v
else: else: