From 188491ea76c03417f1ac4609821ce9ea664f7bb8 Mon Sep 17 00:00:00 2001 From: Martin Langhoff Date: Mon, 23 Jul 2012 19:18:53 +0000 Subject: repos, yumcfg: use cachedurlopen() --- 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)) -- cgit v0.9.1