diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-01 13:15:47 +0200 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-01 13:15:47 +0200 |
| commit | b0c36cefa1e0a4bf99681aade9e26ac6aa1ef903 (patch) | |
| tree | d63dc2036a39e716daf18e3c915fafb2fcba6674 /bin/install_python.py | |
| parent | 6be31f5d140b81227911cabfc61d3802c76c1b61 (diff) | |
| parent | a5d26f7b62414ed38e1815a49a864b15df2e9694 (diff) | |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'bin/install_python.py')
| -rw-r--r-- | bin/install_python.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/install_python.py b/bin/install_python.py index 86807af..5c947ac 100644 --- a/bin/install_python.py +++ b/bin/install_python.py @@ -6,6 +6,7 @@ # This was written for a Linux system (specifically Ubuntu) but should # be reasonably generic to any POSIX-style system with a /usr/local # hierarchy. +from __future__ import print_function import getopt import os @@ -48,7 +49,7 @@ Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...] 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: @@ -57,7 +58,7 @@ Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...] elif o in ('-d', '--downloads'): downloads_dir = a elif o in ('-h', '--help'): - print helpstr + print(helpstr) sys.exit(0) elif o in ('-n', '--no-exec'): CommandRunner.execute = CommandRunner.do_not_execute @@ -65,7 +66,7 @@ Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...] prefix = a elif o in ('-q', '--quiet'): CommandRunner.display = CommandRunner.do_not_display - except Usage, err: + except Usage as err: sys.stderr.write(str(err.msg) + '\n') sys.stderr.write('use -h to get help\n') return 2 |
