summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2016-05-24 17:50:57 +0200
committerHelmut Grohne <helmut@subdivi.de>2016-05-24 17:50:57 +0200
commit89378e07e16c071efed82753cc16fbe2b9fd1598 (patch)
tree322110baa2ee6f6892e46e0e8ece5c4fa9e1d46d
parentbf1824d49d9fd2c19b4258184005822eacf41666 (diff)
downloaddebian-dedup-89378e07e16c071efed82753cc16fbe2b9fd1598.tar.gz
use urlopen from urllib2 on py2
This causes non-successful fetches to result in HTTPErrors like it does in py3 already.
-rwxr-xr-xautoimport.py2
-rwxr-xr-ximportpkg.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/autoimport.py b/autoimport.py
index abd3a5f..9c416c5 100755
--- a/autoimport.py
+++ b/autoimport.py
@@ -18,7 +18,7 @@ except ImportError:
try:
from urllib.request import urlopen
except ImportError:
- from urllib import urlopen
+ from urllib2 import urlopen
import concurrent.futures
from debian import deb822
diff --git a/importpkg.py b/importpkg.py
index b01fad3..ce4a446 100755
--- a/importpkg.py
+++ b/importpkg.py
@@ -12,7 +12,7 @@ import zlib
try:
from urllib.request import urlopen
except ImportError:
- from urllib import urlopen
+ from urllib2 import urlopen
import yaml