Skip to content

Commit cc794f4

Browse files
committed
Fix demo -h didn't work with existing demo, and
required nuke to read the help
1 parent 2eec3d0 commit cc794f4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

demo.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,18 @@ def main():
149149
except getopt.GetoptError, e:
150150
usage(str(e))
151151
return 1
152+
for opt, arg in opts:
153+
if opt == '-h':
154+
usage()
155+
return 0
152156

153157
home = os.path.abspath('demo')
154158
nuke = args and args[0] == 'nuke'
155159
if not os.path.exists(home) or nuke:
156160
backend = 'anydbm'
157161
template = 'classic'
158162
for opt, arg in opts:
159-
if opt == '-h':
160-
usage()
161-
return 0
162-
elif opt == '-t':
163+
if opt == '-t':
163164
template = arg
164165
elif opt == '-b':
165166
backend = arg

0 commit comments

Comments
 (0)