Commit 4cb78d4f authored by Amos Latteier's avatar Amos Latteier

Fixed z2.py to reject negative port numbers. This fixes Daniel Drucker's...

Fixed z2.py to reject negative port numbers. This fixes Daniel Drucker's problem of starting ZServer with "-w -2" as command line arguments.
parent c9626234
......@@ -265,17 +265,23 @@ try:
elif o=='-D': os.environ['Z_DEBUG_MODE']='1'
elif o=='-m':
if v:
try: v=string.atoi(v)
try:
v=string.atoi(v)
if v < 1: raise 'Invalid port', v
except: raise 'Invalid port', v
MONITOR_PORT=v
elif o=='-w':
if v:
try: v=string.atoi(v)
try:
v=string.atoi(v)
if v < 1: raise 'Invalid port', v
except: raise 'Invalid port', v
HTTP_PORT=v
elif o=='-f':
if v:
try: v=string.atoi(v)
try:
v=string.atoi(v)
if v < 1: raise 'Invalid port', v
except: raise 'Invalid port', v
FTP_PORT=v
elif o=='-p': PCGI_FILE=v
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment