limit port range of socat_port to 1-65534 since qira_config.FORK_PORT is assigned args.socat_port + 1

This commit is contained in:
Petercommand 2015-12-07 01:36:08 +08:00
parent c03ed76251
commit 743298aa44
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ if __name__ == '__main__':
# validate arguments
if args.web_port < 1 or args.web_port > 65535:
raise Exception("--web-port must be a valid port number (1-65535)")
if args.socat_port < 1 or args.socat_port > 65535:
raise Exception("--socat-port must be a valid port number (1-65535)")
if args.socat_port < 1 or args.socat_port > 65534:
raise Exception("--socat-port must be a valid port number (1-65534)")
try:
args.host = ipaddr.IPAddress(args.host).exploded
except ValueError: