---
yum/misc.py | 10 ++++++----
yum/yumRepo.py | 3 +++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/yum/misc.py b/yum/misc.py
index 8e21fe7..b4159c1 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -252,11 +252,13 @@ class Checksums:
if sumtype in done:
continue
+ sumalgo = None
if sumtype in _available_checksums:
- sumalgo = hashlib.new(sumtype)
- elif ignore_missing:
- continue
- else:
+ try: sumalgo = hashlib.new(sumtype)
+ except ValueError: pass
+ if not sumalgo:
+ if ignore_missing:
+ continue
raise MiscError, 'Error Checksumming, bad checksum type %s' %
sumtype
done.add(sumtype)
self._sumtypes.append(sumtype)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index e217c57..40e6f78 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -639,6 +639,9 @@ class YumRepository(Repository, config.RepoConf):
if tries <= self.retries - len(self.urls):
# don't remove this mirror yet
action['remove'] = False
+ elif e.errno == -3:
+ # unsupported checksum type, fail now
+ action['fail'] = True
# No known user of this callback, but just in case...
cb = self.mirror_failure_obj
--
1.7.11.7
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel