Re: [Rest2web-develop] Recent Issues
Brought to you by:
mjfoord
From: martin f k. <ma...@ma...> - 2006-08-06 01:25:18
|
also sprach Michael Foord <mi...@pc...> [2006.08.03.2322 +0100]: > make_dist.py now takes a 'nopause' option as a command line argument. Can r2w also get an option like this, to override the r2w.ini setting? The following patch implements -n/--nopause Index: rest2web/command_line.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- rest2web/command_line.py (revision 194) +++ rest2web/command_line.py (working copy) @@ -49,6 +49,7 @@ 'template': None, 'uservalues': [], 'force': False, + 'nopause': False, } =20 usage =3D "%prog [options] config_file" @@ -88,6 +89,10 @@ parser.add_option("-f", '--force', action=3D"store_true", dest=3D"forc= e", help=3D"Force site without indexes, restindexes or template.") # + # No pause + parser.add_option("-n", '--nopause', action=3D"store_true", dest=3D"no= pause", + help=3D"Do not pause after processing (overrides setting in config= file).") + # parser.set_defaults(**DEFAULTS) # (option_obj, args) =3D parser.parse_args() @@ -107,6 +112,7 @@ # options['uservalues'] =3D get_uservalues(option_obj.uservalues, enc) options['force'] =3D option_obj.force + options['nopause'] =3D option_obj.nopause # # Sort the arguments if args: Index: r2w.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- r2w.py (revision 194) +++ r2w.py (working copy) @@ -134,6 +134,7 @@ pass # options, config =3D get_config() + print options if os.path.isfile('__dist__'): print 'Won\'t run from distribution directory.' print "Run 'make_dist.py' and use the distribution it creates." @@ -202,7 +203,8 @@ if standerr: standerr.close() # - if istrue(config.get('pause', 'False')): + if not options.get('nopause', False) \ + and istrue(config.get('pause', 'False')): raw_input('Hit return to continue >>> ') =20 """ Thanks, --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "violence is the last refuge of the incompetent" -- isaac asimov |