Skip to content

Commit 22b1526

Browse files
author
Alexander Smishlajev
committed
apply DEFAULT_PORT in the same way as other defaults...
(wasn't set at all if there was no config)
1 parent 127e97f commit 22b1526

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

roundup/scripts/roundup_server.py

Lines changed: 5 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.61 2004-09-21 08:16:50 a1s Exp $
20+
$Id: roundup_server.py,v 1.62 2004-09-21 09:29:18 a1s Exp $
2121
"""
2222
__docformat__ = 'restructuredtext'
2323

@@ -509,8 +509,8 @@ def run(port=undefined, success_message=None):
509509
if config:
510510
cfg = ConfigParser.ConfigParser()
511511
cfg.read(filename)
512-
if port is undefined:
513-
port = cfg.get('server', 'port', DEFAULT_PORT)
512+
if port is undefined and cfg.has_option('server', 'port'):
513+
port = cfg.get('server', 'port')
514514
if user is undefined and cfg.has_option('server', 'user'):
515515
user = cfg.get('server', 'user')
516516
if group is undefined and cfg.has_option('server', 'group'):
@@ -531,6 +531,8 @@ def run(port=undefined, success_message=None):
531531
# defaults
532532
if hostname is undefined:
533533
hostname = ''
534+
if port is undefined:
535+
port = DEFAULT_PORT
534536
if group is undefined:
535537
group = None
536538
if user is undefined:

0 commit comments

Comments
 (0)