diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-05-13 18:53:50 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-05-13 18:53:50 -0700 |
commit | 58a8cd1bb943522bc53d02c008ee8eff798bfaaa (patch) | |
tree | ef6d8eb9809447d3814f7f48e2cb77cd18b4c9d7 /bin | |
parent | eb1f9aefed672307caa5fc1286f9a35bed3ea9f4 (diff) | |
download | portage-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 'bin')
-rwxr-xr-x | bin/repoman | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/repoman b/bin/repoman index 1fc9acce2..369740335 100755 --- a/bin/repoman +++ b/bin/repoman @@ -25,6 +25,11 @@ import textwrap import time import platform +try: + from urllib.request import urlopen as urllib_request_urlopen +except ImportError: + from urllib import urlopen as urllib_request_urlopen + from itertools import chain from stat import S_ISDIR @@ -70,7 +75,7 @@ from portage.process import find_binary, spawn from portage.output import bold, create_color_func, \ green, nocolor, red from portage.output import ConsoleStyleFile, StyleWriter -from portage.util import cmp_sort_key, urlopen, writemsg_level +from portage.util import writemsg_level from portage.util._desktop_entry import validate_desktop_entry from portage.package.ebuild.digestgen import digestgen from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use @@ -1046,7 +1051,7 @@ def fetch_metadata_dtd(): "needs to be refetched, doing that now") print() try: - url_f = urlopen(metadata_dtd_uri) + url_f = urllib_request_urlopen(metadata_dtd_uri) msg_info = url_f.info() last_modified = msg_info.get('last-modified') if last_modified is not None: |