summaryrefslogtreecommitdiffstats
path: root/pym/portage/glsa.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/glsa.py')
-rw-r--r--pym/portage/glsa.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py
index 95c3c813c..1f061b231 100644
--- a/pym/portage/glsa.py
+++ b/pym/portage/glsa.py
@@ -4,7 +4,10 @@
import codecs
import sys
-import urllib
+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
@@ -470,7 +473,7 @@ class Glsa:
myurl = "file://"+self.nr
else:
myurl = repository + "glsa-%s.xml" % str(self.nr)
- self.parse(urllib.urlopen(myurl))
+ self.parse(urllib_request_urlopen(myurl))
return None
def parse(self, myfile):