Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Langhoff <martin@laptop.org>2012-07-23 19:18:53 (GMT)
committer Daniel Drake <dsd@laptop.org>2012-08-20 20:32:31 (GMT)
commit188491ea76c03417f1ac4609821ce9ea664f7bb8 (patch)
tree3cdf6579d84df64b0af4910700b5b35f60d142e9
parentdc3aa94150215ea49ec849ab880385222f98bf3c (diff)
repos, yumcfg: use cachedurlopen()
-rw-r--r--modules/repos/ksmain.50.repos.py3
-rw-r--r--modules/yumcfg/kspost.50.yumcfg.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/modules/repos/ksmain.50.repos.py b/modules/repos/ksmain.50.repos.py
index c6b3872..e19f87a 100644
--- a/modules/repos/ksmain.50.repos.py
+++ b/modules/repos/ksmain.50.repos.py
@@ -4,7 +4,6 @@
import os
import sys
import ooblib
-import urllib2
from gzip import GzipFile
from StringIO import StringIO
@@ -23,7 +22,7 @@ def add_to_excludes(baseurl, addexcludes):
url = baseurl + '/' + repomd['primary']
print >>sys.stderr, "Reading package information from", url
- fd = urllib2.urlopen(url)
+ fd = ooblib.cachedurlopen(url)
data = fd.read()
fd.close()
fd = GzipFile(fileobj=StringIO(data))
diff --git a/modules/yumcfg/kspost.50.yumcfg.py b/modules/yumcfg/kspost.50.yumcfg.py
index dc16716..6685913 100644
--- a/modules/yumcfg/kspost.50.yumcfg.py
+++ b/modules/yumcfg/kspost.50.yumcfg.py
@@ -3,7 +3,6 @@
import os
import sys
-import urllib2
from gzip import GzipFile
from StringIO import StringIO
@@ -25,7 +24,7 @@ for var in os.environ:
for for_excludes, name, url in addrepos:
if not for_excludes:
continue
- fd = urllib2.urlopen(url + "/repodata/primary.xml.gz")
+ fd = ooblib.cachedurlopen(url + "/repodata/primary.xml.gz")
data = fd.read()
fd.close()
fd = GzipFile(fileobj=StringIO(data))