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
|
||||
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:
|
||||
opts.listen_host, opts.listen_port = '', args[0]
|
||||
|
||||
|
@ -267,7 +267,7 @@ if __name__ == '__main__':
|
|||
opts.target_port = None
|
||||
else:
|
||||
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:
|
||||
parser.error("Error parsing target")
|
||||
try: opts.target_port = int(opts.target_port)
|
||||
|
|
Loading…
Reference in New Issue