--- 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)