projects
/
curses-crossword.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
547335b
)
Be slightly nicer when option parsing fails
author
Brett Parker
<iDunno@sommitrealweird.co.uk>
Thu, 9 Jul 2009 14:08:53 +0000
(15:08 +0100)
committer
Brett Parker
<iDunno@sommitrealweird.co.uk>
Thu, 9 Jul 2009 14:08:53 +0000
(15:08 +0100)
curses-crossword.py
patch
|
blob
|
history
diff --git
a/curses-crossword.py
b/curses-crossword.py
index 92f9b926394fa9ee8df623d348cd0715c4c2ff10..19ee754ef125f87a3bcf9692701ce1fd6dbd1c2e 100644
(file)
--- a/
curses-crossword.py
+++ b/
curses-crossword.py
@@
-32,7
+32,11
@@
except:
filename = None
filename = None
-(options, args) = getopt.getopt(sys.argv[1:], "f:", "file=")
+try:
+ (options, args) = getopt.getopt(sys.argv[1:], "f:", "file=")
+except getopt.GetoptError, err:
+ print str(err)
+ sys.exit(2)
for option in options:
if option[0] == "-f" or option[0] == "--file":
for option in options:
if option[0] == "-f" or option[0] == "--file":