From 58a8cd1bb943522bc53d02c008ee8eff798bfaaa Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 13 May 2012 18:53:50 -0700 Subject: 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. --- pym/portage/dbapi/bintree.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pym/portage/dbapi') 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" -- cgit v1.2.3-1-g7c22