[Yum-devel] [PATCH] make sure if our metalink or mirrorlist has any odd chars in it that we don't traceback trying to print it
Seth Vidal
skvidal at fedoraproject.org
Wed Oct 7 14:13:27 UTC 2009
this is just like ticket 286 - and it hits rhbug 508422, 502975
---
yum/yumRepo.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index feb1f7d..006f410 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -689,7 +689,7 @@ class YumRepository(Repository, config.RepoConf):
raise Errors.RepoError, msg
# Now, we have an old usable metalink, so we can't move to
# a newer repomd.xml ... or checksums won't match.
- print "Could not get metalink %s error was \n%s" %(url, e)
+ print "Could not get metalink %s error was\n%s: %s" % (url, e.args[0], misc.to_unicode(e.args[1]))
self._metadataCurrent = True
if not self._metadataCurrent:
@@ -1813,7 +1813,7 @@ def getMirrorList(mirrorlist, pdict = None):
try:
fo = urlresolver.urlopen(url, proxies=pdict)
except urlgrabber.grabber.URLGrabError, e:
- print "Could not retrieve mirrorlist %s error was\n%s" % (url, e)
+ print "Could not retrieve mirrorlist %s error was\n%s: %s" % (url, e.args[0], misc.to_unicode(e.args[1]))
fo = None
if fo is not None:
--
1.6.2.5
More information about the Yum-devel
mailing list