Fix for python 2.4
Use rsplit(':', 1) instead of rpartition(':') in port argument
processing.
python2.4 may or may not work with HyBi which requires the numpy and
ctypes modules.
This commit is contained in:
parent
4a84ab3777
commit
2e00f96431
|
|
@ -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