[Yum-devel] [PATCH] raise miscerror if the transaction-all file is garbage.
Seth Vidal
skvidal at fedoraproject.org
Thu Jun 3 16:30:53 UTC 2010
---
yum/misc.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/yum/misc.py b/yum/misc.py
index 09e4dd6..086fd89 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -804,7 +804,11 @@ def find_ts_remaining(timestamp, yumlibpath='/var/lib/yum'):
item = item.replace('\n', '')
if item == '':
continue
- (action, pkgspec) = item.split()
+ try:
+ (action, pkgspec) = item.split()
+ except ValueError, e:
+ msg = "Transaction journal file %s is corrupt." % (tsallpath)
+ raise Errors.MiscError, msg
to_complete_items.append((action, pkgspec))
return to_complete_items
--
1.7.0.1
More information about the Yum-devel
mailing list