aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-05-13 18:53:50 -0700
committerZac Medico <zmedico@gentoo.org>2012-05-13 18:53:50 -0700
commit58a8cd1bb943522bc53d02c008ee8eff798bfaaa (patch)
treeef6d8eb9809447d3814f7f48e2cb77cd18b4c9d7 /pym/portage/dbapi
parentglsa: use _pkg_str + vercmp, not pkgcmp (diff)
downloadportage-58a8cd1bb943522bc53d02c008ee8eff798bfaaa.tar.gz
portage-58a8cd1bb943522bc53d02c008ee8eff798bfaaa.tar.bz2
portage-58a8cd1bb943522bc53d02c008ee8eff798bfaaa.zip
Revert "Bug #413983: Add portage.util.urlopen(), which transparently handles authentication in the way compatible with Python 3."
This reverts commit 0a9cc38a66ded0cf0e5b534cb24b970fc9c21920. As reported in bug #415579, that commit broke FTP authentication.
Diffstat (limited to 'pym/portage/dbapi')
-rw-r--r--pym/portage/dbapi/bintree.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 52b85b88e..4ac48c9df 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -26,7 +26,6 @@ from portage.dep import Atom, use_reduce, paren_enclose
from portage.exception import AlarmSignal, InvalidPackageName, \
PermissionDenied, PortageException
from portage.localization import _
-from portage.util import urlopen
from portage import _movefile
from portage import os
from portage import _encodings
@@ -46,8 +45,10 @@ import warnings
from itertools import chain
try:
from urllib.parse import urlparse
+ from urllib.request import urlopen as urllib_request_urlopen
except ImportError:
from urlparse import urlparse
+ from urllib import urlopen as urllib_request_urlopen
if sys.hexversion >= 0x3000000:
basestring = str
@@ -844,7 +845,7 @@ class binarytree(object):
# slash, so join manually...
url = base_url.rstrip("/") + "/Packages"
try:
- f = urlopen(url)
+ f = urllib_request_urlopen(url)
except IOError:
path = parsed_url.path.rstrip("/") + "/Packages"