diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-03 06:26:58 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-03 06:26:58 +0200 |
commit | 27b47b5db42407baf5d704bf52c35015b2c0ad7b (patch) | |
tree | 320f8d5fc315c211f7d073891bd7117754f5f5b3 /bin/Command.py | |
parent | 6be31f5d140b81227911cabfc61d3802c76c1b61 (diff) | |
parent | fabd454ddf505302bf41ef4da0609437c29d5605 (diff) |
Merge branch 'release/3.0.0+repack-1'3.0.0+repack-1
Diffstat (limited to 'bin/Command.py')
-rw-r--r-- | bin/Command.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/Command.py b/bin/Command.py index 8702f51..dadd7a9 100644 --- a/bin/Command.py +++ b/bin/Command.py @@ -4,6 +4,7 @@ # # XXX Describe what the script does here. # +from __future__ import print_function import getopt import os @@ -109,18 +110,18 @@ Usage: script-template.py [-hnq] try: try: opts, args = getopt.getopt(argv[1:], short_options, long_options) - except getopt.error, msg: + except getopt.error as msg: raise Usage(msg) for o, a in opts: if o in ('-h', '--help'): - print helpstr + print(helpstr) sys.exit(0) elif o in ('-n', '--no-exec'): Command.execute = Command.do_not_execute elif o in ('-q', '--quiet'): Command.display = Command.do_not_display - except Usage, err: + except Usage as err: sys.stderr.write(err.msg) sys.stderr.write('use -h to get help') return 2 |