Unknown option handling
svn: r1551
This commit is contained in:
parent
0946e3c0f7
commit
7eded566a4
@ -142,8 +142,14 @@ class Gramps:
|
||||
|
||||
self.cl = 1
|
||||
if args:
|
||||
try:
|
||||
options,leftargs = getopt.getopt(args,
|
||||
const.shortopts,const.longopts)
|
||||
except getopt.GetoptError,msg:
|
||||
print "Error: %s. Exiting." % msg
|
||||
os._exit(1)
|
||||
except:
|
||||
print "Error parsing arguments: %s " % args
|
||||
if leftargs:
|
||||
print "Unrecognized option: %s" % leftargs[0]
|
||||
os._exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user