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. --- bin/repoman | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bin') 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: -- cgit v1.2.3-1-g7c22