Skip to content

Commit 39c81a2

Browse files
author
Alexander Smishlajev
committed
respect function argument 'port' in run()
1 parent 6679a68 commit 39c81a2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

roundup/scripts/roundup_server.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
"""Command-line script that runs a server over roundup.cgi.client.
1919
20-
$Id: roundup_server.py,v 1.65 2004-10-17 18:22:32 a1s Exp $
20+
$Id: roundup_server.py,v 1.66 2004-10-18 07:43:58 a1s Exp $
2121
"""
2222
__docformat__ = 'restructuredtext'
2323

@@ -592,8 +592,12 @@ def run(port=undefined, success_message=None):
592592

593593
RoundupRequestHandler.LOG_IPADDRESS = not config.LOG_HOSTNAMES
594594

595-
# obtain server before changing user id - allows to use port <
596-
# 1024 if started as root
595+
# port number in function arguments overrides config and command line
596+
if port is not undefined:
597+
config.PORT = port
598+
599+
# obtain server before changing user id - allows
600+
# to use port < 1024 if started as root
597601
try:
598602
httpd = server_class((config.HOST, config.PORT), RoundupRequestHandler)
599603
except socket.error, e:

0 commit comments

Comments
 (0)