Fix websockify with python2.4
https://github.com/kanaka/noVNC/issues/72 Pull from websockify 2e00f9643.
This commit is contained in:
parent
676fbbb662
commit
46c621175c
|
@ -255,7 +255,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Parse host:port and convert ports to numbers
|
# Parse host:port and convert ports to numbers
|
||||||
if args[0].count(':') > 0:
|
if args[0].count(':') > 0:
|
||||||
opts.listen_host, sep, opts.listen_port = args[0].rpartition(':')
|
opts.listen_host, opts.listen_port = args[0].rsplit(':', 1)
|
||||||
else:
|
else:
|
||||||
opts.listen_host, opts.listen_port = '', args[0]
|
opts.listen_host, opts.listen_port = '', args[0]
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ if __name__ == '__main__':
|
||||||
opts.target_port = None
|
opts.target_port = None
|
||||||
else:
|
else:
|
||||||
if args[1].count(':') > 0:
|
if args[1].count(':') > 0:
|
||||||
opts.target_host, sep, opts.target_port = args[1].rpartition(':')
|
opts.target_host, opts.target_port = args[1].rsplit(':', 1)
|
||||||
else:
|
else:
|
||||||
parser.error("Error parsing target")
|
parser.error("Error parsing target")
|
||||||
try: opts.target_port = int(opts.target_port)
|
try: opts.target_port = int(opts.target_port)
|
||||||
|
|
Loading…
Reference in New Issue