summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-05-01 21:51:16 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-05-01 21:51:16 +0200
commit0a9cc38a66ded0cf0e5b534cb24b970fc9c21920 (patch)
tree85ac09a67f008adf2ab8f85ab6f20e051c642ca1 /bin
parent721b4b7d8a9f6cca32d946dd416d221cbc3088b2 (diff)
downloadportage-0a9cc38a66ded0cf0e5b534cb24b970fc9c21920.tar.gz
portage-0a9cc38a66ded0cf0e5b534cb24b970fc9c21920.tar.bz2
portage-0a9cc38a66ded0cf0e5b534cb24b970fc9c21920.zip
Bug #413983: Add portage.util.urlopen(), which transparently
handles authentication in the way compatible with Python 3.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman9
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/repoman b/bin/repoman
index 1cdfcf674..cfe4b8e01 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -25,11 +25,6 @@ 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
@@ -75,7 +70,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, writemsg_level
+from portage.util import cmp_sort_key, urlopen, 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
@@ -1051,7 +1046,7 @@ def fetch_metadata_dtd():
"needs to be refetched, doing that now")
print()
try:
- url_f = urllib_request_urlopen(metadata_dtd_uri)
+ url_f = urlopen(metadata_dtd_uri)
msg_info = url_f.info()
last_modified = msg_info.get('last-modified')
if last_modified is not None: