comparison roundup/scripts/roundup_demo.py @ 6042:d09a1d6a3bd9

flake8 whitespace fixes; add version_check import version_check to make sure we are running with version > 2.7 python.
author John Rouillard <rouilj@ieee.org>
date Tue, 07 Jan 2020 21:37:48 -0500
parents 4cf48ff01e04
children 062a54eeb0a1
comparison
equal deleted inserted replaced
6041:c7a9f9c1801d 6042:d09a1d6a3bd9
23 23
24 24
25 from roundup import admin, configuration, demo, instance 25 from roundup import admin, configuration, demo, instance
26 from roundup.i18n import _ 26 from roundup.i18n import _
27 from roundup.anypy.my_input import my_input 27 from roundup.anypy.my_input import my_input
28 from roundup import version_check
28 29
29 def run(): 30 def run():
30 home = DEFAULT_HOME 31 home = DEFAULT_HOME
31 template = DEFAULT_TEMPLATE 32 template = DEFAULT_TEMPLATE
32 nuke = sys.argv[-1] == 'nuke' 33 nuke = sys.argv[-1] == 'nuke'
49 if not home: 50 if not home:
50 home = DEFAULT_HOME 51 home = DEFAULT_HOME
51 templates = admin.AdminTool().listTemplates().keys() 52 templates = admin.AdminTool().listTemplates().keys()
52 template = my_input( 53 template = my_input(
53 _('Enter tracker template to use (one of (%s)) [%s]: ') % 54 _('Enter tracker template to use (one of (%s)) [%s]: ') %
54 (','.join(templates),template)) 55 (','.join(templates), template))
55 if not template: 56 if not template:
56 template = DEFAULT_TEMPLATE 57 template = DEFAULT_TEMPLATE
57 # install 58 # install
58 demo.install_demo(home, backend, 59 demo.install_demo(home, backend,
59 admin.AdminTool().listTemplates()[template]['path']) 60 admin.AdminTool().listTemplates()[template]['path'])
60 # run 61 # run
61 demo.run_demo(home) 62 demo.run_demo(home)
63
62 64
63 if __name__ == '__main__': 65 if __name__ == '__main__':
64 run() 66 run()
65 67
66 # vim: set et sts=4 sw=4 : 68 # vim: set et sts=4 sw=4 :

Roundup Issue Tracker: http://roundup-tracker.org/