diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-28 12:19:30 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-28 12:19:30 +0200 |
commit | 7c6dd0eee627772485f8b06470ac84adc0f077f6 (patch) | |
tree | 69a28021c01029c221f78be31c4cb0335922ebfe /bin/install_python.py | |
parent | 6be31f5d140b81227911cabfc61d3802c76c1b61 (diff) | |
parent | baee03c569c91b745a1e025660b19a718db16e7d (diff) |
Updated version 3.0.0 from 'upstream/3.0.0'
with Debian dir 147caafe8506326dfd094432b42ae32c21ed284e
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 |