[yum-commits] Branch 'yum-3_2_X' - output.py
Ville Skyttä
scop at osuosl.org
Tue Sep 7 17:52:06 UTC 2010
output.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
New commits:
commit d224e3d7a16100c8697754a7be717fb2f17db121
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Sep 4 10:28:56 2010 +0300
Fix error message for malformed transaction ids in history addon-info, allow "last".
diff --git a/output.py b/output.py
index 10c7442..1b6bc70 100755
--- a/output.py
+++ b/output.py
@@ -1754,13 +1754,14 @@ to exit.
tid = None
if len(extcmds) > 1:
tid = extcmds[1]
- try:
- int(tid)
- except ValueError:
- self.logger.critical(_('No transaction ID given'))
- return 1, ['Failed history addon-info']
- except TypeError:
- pass # No tid arg. passed, use last...
+ if tid == 'last':
+ tid = None
+ if tid is not None:
+ try:
+ int(tid)
+ except ValueError:
+ self.logger.critical(_('Bad transaction ID given'))
+ return 1, ['Failed history addon-info']
if tid is not None:
old = self.history.old(tids=[tid])
More information about the Yum-commits
mailing list