diff options
author | Guido Günther <agx@sigxcpu.org> | 2015-07-03 18:14:46 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2015-07-08 20:06:31 +0200 |
commit | cf67fc59869db03c8bfbcf4264b13defd5d455d0 (patch) | |
tree | b5caea2d9bca191fbf9bf498e384f87a6d1d3b30 | |
parent | 46eacf23f1b35acc76e47ec436417d60ebcdfede (diff) |
Fix urllib.urlopen import
six.moves.urllib.urlopen does not exist
-rwxr-xr-x | gbp/scripts/import_srpm.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gbp/scripts/import_srpm.py b/gbp/scripts/import_srpm.py index 646b698e..1841fa7a 100755 --- a/gbp/scripts/import_srpm.py +++ b/gbp/scripts/import_srpm.py @@ -25,6 +25,7 @@ import glob import time import shutil import errno +from six.moves.urllib.request import urlopen from six.moves import urllib import gbp.tmpfile as tempfile @@ -53,7 +54,7 @@ def download_file(target_dir, url): """Download a remote file""" gbp.log.info("Downloading '%s'..." % url) try: - urlobj = urllib.urlopen(url) + urlobj = urlopen(url) local_fn = os.path.join(target_dir, os.path.basename(url)) with open(local_fn, "wb") as local_file: local_file.write(urlobj.read()) |