Mercurial > p > roundup > code
diff demo.py @ 4729:3fa74b99d42d
Fix `demo -h` didn't work with existing demo, and
required nuke to read the help
| author | anatoly techtonik <techtonik@gmail.com> |
|---|---|
| date | Mon, 14 Jan 2013 14:55:54 +0300 |
| parents | 324cbd9f7d0e |
| children | a0654b1283a4 |
line wrap: on
line diff
--- a/demo.py Mon Jan 14 00:13:58 2013 +0300 +++ b/demo.py Mon Jan 14 14:55:54 2013 +0300 @@ -149,6 +149,10 @@ except getopt.GetoptError, e: usage(str(e)) return 1 + for opt, arg in opts: + if opt == '-h': + usage() + return 0 home = os.path.abspath('demo') nuke = args and args[0] == 'nuke' @@ -156,10 +160,7 @@ backend = 'anydbm' template = 'classic' for opt, arg in opts: - if opt == '-h': - usage() - return 0 - elif opt == '-t': + if opt == '-t': template = arg elif opt == '-b': backend = arg
