Hi Luk, On Tue, 03.02.2009 at 19:48:05 +0100, Luk Claes <l...@debian.org> wrote: > Toni Mueller wrote: > > * fix roundup-demo argument parsing (closes: #509973) > if this is fixed in the manpage, then ok, otherwise it depends on the diff
thanks for ack'ing the other bugs. I have two questions left (shame on me). One... this is the patch I propose for fixing #509973: --- demo.py 2007-10-05 05:06:21.000000000 +0200 +++ demo.py.modified 2009-01-19 01:12:43.000000000 +0100 @@ -108,7 +108,7 @@ run demo on a server host, please stop the demo, open file "demo/config.ini" with your editor, change the host name in the "web" option in section "[tracker]", save the file, then re-run the demo -program. +program. If you want to change backend types, you must use "nuke". ''' % url @@ -122,11 +122,17 @@ Sets up the web service on localhost. Disables nosy lists. """ home = os.path.abspath('demo') - if not os.path.exists(home) or (sys.argv[-1] == 'nuke'): - if len(sys.argv) > 2: - backend = sys.argv[-2] - else: - backend = 'anydbm' + backend = 'anydbm' + try: + backend = sys.argv[1] + except: + pass + nuke = False + try: + nuke = sys.argv[2] == 'nuke' + except: + pass + if not os.path.exists(home) or nuke: install_demo(home, backend, os.path.join('templates', 'classic')) run_demo(home) The patch does away with parsing the argument list from the end, but instead starts at the front, catching exceptions due to missing arguments and setting/using defaults in that case. If this would not be ok, I'd amend the man page instead. In any case... Should I upload the completed package to testing or to unstable, and with urgency high? TIA! -- Kind regards, --Toni++
signature.asc
Description: Digital signature