Skip to content

Commit fc3711e

Browse files
author
Alexander Smishlajev
committed
fix: tracker definitions from the command line...
...were FilePathOptions, not TrackerHomeOptions; remove all descriptions from TrackerHomeOption format
1 parent da5d4c1 commit fc3711e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

roundup/scripts/roundup_server.py

Lines changed: 9 additions & 7 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.63 2004-10-17 17:54:48 a1s Exp $
20+
$Id: roundup_server.py,v 1.64 2004-10-17 18:14:22 a1s Exp $
2121
"""
2222
__docformat__ = 'restructuredtext'
2323

@@ -462,10 +462,13 @@ def setuid(user):
462462
os.setuid(uid)
463463

464464
class TrackerHomeOption(configuration.FilePathOption):
465-
# Tracker homes do not need description strings
466-
# attached to FilePathOption. Description appears once
467-
# before the trackers section.
468-
class_description = ""
465+
466+
# Tracker homes do not need any description strings
467+
def format(self):
468+
return "%(name)s = %(value)s\n" % {
469+
"name": self.setting,
470+
"value": self.value2str(self._value),
471+
}
469472

470473
class ServerConfig(configuration.Config):
471474

@@ -570,8 +573,7 @@ def run(port=undefined, success_message=None):
570573
name, home = arg.split('=')
571574
except ValueError:
572575
raise ValueError, _("Instances must be name=home")
573-
config.add_option(
574-
configuration.FilePathOption(config, "trackers", name))
576+
config.add_option(TrackerHomeOption(config, "trackers", name))
575577
config["TRACKERS_" + name.upper()] = home
576578

577579
# handle remaining options

0 commit comments

Comments
 (0)