diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-09-22 17:08:12 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-09-22 17:08:12 (GMT) |
commit | 953dc41b8b720fdcec7955de67d23206214e5125 (patch) | |
tree | b95b2144ccf82d8227cec025af152f4eadfa7282 /bin/install_scons.py | |
parent | 328e541f40849c270fc75f0932594d18d2e6340b (diff) | |
download | SCons-953dc41b8b720fdcec7955de67d23206214e5125.zip SCons-953dc41b8b720fdcec7955de67d23206214e5125.tar.gz SCons-953dc41b8b720fdcec7955de67d23206214e5125.tar.bz2 |
Result of raw 2to3 run (2to3-2.7); checkpoint for python3 conversion.
Diffstat (limited to 'bin/install_scons.py')
-rw-r--r-- | bin/install_scons.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/install_scons.py b/bin/install_scons.py index 00129f6..b732193 100644 --- a/bin/install_scons.py +++ b/bin/install_scons.py @@ -23,7 +23,7 @@ import os import shutil import sys import tarfile -import urllib +import urllib.request, urllib.parse, urllib.error from Command import CommandRunner, Usage @@ -129,7 +129,7 @@ Usage: install_scons.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: @@ -138,7 +138,7 @@ Usage: install_scons.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 @@ -146,7 +146,7 @@ Usage: install_scons.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 @@ -171,7 +171,7 @@ Usage: install_scons.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...] if not os.path.exists(tar_gz): if not os.path.exists(downloads_dir): cmd.run('mkdir %(downloads_dir)s') - cmd.run((urllib.urlretrieve, tar_gz_url, tar_gz), + cmd.run((urllib.request.urlretrieve, tar_gz_url, tar_gz), 'wget -O %(tar_gz)s %(tar_gz_url)s') def extract(tar_gz): |