Python3 fixes

This commit is contained in:
Thomas Nagy 2017-09-10 20:34:15 +02:00
parent be05b6ee8b
commit dcefc468bb
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
1 changed files with 3 additions and 3 deletions

View File

@ -56,11 +56,11 @@ class opt_parser(optparse.OptionParser):
while rargs: while rargs:
try: try:
optparse.OptionParser._process_args(self,largs,rargs,values) optparse.OptionParser._process_args(self,largs,rargs,values)
except (optparse.BadOptionError, optparse.AmbiguousOptionError), err: except (optparse.BadOptionError, optparse.AmbiguousOptionError) as e:
if self.allow_unknown: if self.allow_unknown:
largs.append(err.opt_str) largs.append(e.opt_str)
else: else:
self.error(str(err)) self.error(str(e))
def print_usage(self, file=None): def print_usage(self, file=None):
return self.print_help(file) return self.print_help(file)