summaryrefslogtreecommitdiffstats
path: root/pym/portage/glsa.py
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/glsa.py
parenteb1f9aefed672307caa5fc1286f9a35bed3ea9f4 (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/glsa.py')
-rw-r--r--pym/portage/glsa.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py
index 0e590688e..185769574 100644
--- a/pym/portage/glsa.py
+++ b/pym/portage/glsa.py
@@ -5,6 +5,10 @@ from __future__ import absolute_import
import io
import sys
+try:
+ from urllib.request import urlopen as urllib_request_urlopen
+except ImportError:
+ from urllib import urlopen as urllib_request_urlopen
import re
import xml.dom.minidom
@@ -14,7 +18,7 @@ from portage import _encodings
from portage import _unicode_decode
from portage import _unicode_encode
from portage.versions import pkgsplit, vercmp, best
-from portage.util import grabfile, urlopen
+from portage.util import grabfile
from portage.const import CACHE_PATH
from portage.localization import _
from portage.dep import _slot_separator
@@ -469,7 +473,7 @@ class Glsa:
myurl = "file://"+self.nr
else:
myurl = repository + "glsa-%s.xml" % str(self.nr)
- self.parse(urlopen(myurl))
+ self.parse(urllib_request_urlopen(myurl))
return None
def parse(self, myfile):