Skip to content

Commit 2e55996

Browse files
author
Alexander Smishlajev
committed
patching roundup_server.RoundupRequestHandler class directly...
...does not work anymore. use sys.argv to pass the tracker spec and port number to roundup_server.run()
1 parent e6f9c6c commit 2e55996

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

demo.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Copyright (c) 2003 Richard Jones ([email protected])
44
#
5-
# $Id: demo.py,v 1.20 2004-10-19 08:04:12 a1s Exp $
5+
# $Id: demo.py,v 1.21 2004-10-29 15:55:16 a1s Exp $
66

77
import errno
88
import os
@@ -92,7 +92,6 @@ def install_demo(home, backend, template):
9292

9393
def run_demo(home):
9494
"""Run the demo tracker installed in ``home``"""
95-
roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home}
9695
cfg = configuration.CoreConfig(home)
9796
url = cfg["TRACKER_WEB"]
9897
hostname, port = urlparse.urlparse(url)[1].split(':')
@@ -106,8 +105,8 @@ def run_demo(home):
106105
''' % url
107106

108107
# disable command line processing in roundup_server
109-
sys.argv = sys.argv[:1]
110-
roundup_server.run(port=port, success_message=success_message)
108+
sys.argv = sys.argv[:1] + ['-p', str(port), 'demo=' + home]
109+
roundup_server.run(success_message=success_message)
111110

112111
def demo_main():
113112
"""Run a demo server for users to play with for instant gratification.

0 commit comments

Comments
 (0)