[yum-commits] plugins/changelog

skvidal at osuosl.org skvidal at osuosl.org
Tue Jan 12 20:31:25 UTC 2010


 plugins/changelog/changelog.py |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 4441a3eea53373cac1f69db011c7660d756efe8d
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Jan 12 15:31:13 2010 -0500

    fix for bug: https://bugzilla.redhat.com/show_bug.cgi?id=546811
    - make sure we catch valueerror later, too

diff --git a/plugins/changelog/changelog.py b/plugins/changelog/changelog.py
index 6c4d29d..250326f 100644
--- a/plugins/changelog/changelog.py
+++ b/plugins/changelog/changelog.py
@@ -27,7 +27,7 @@ from yum.plugins import PluginYumExit
 from yum import logginglevels
 import logging
 
-from yum.i18n import to_unicode
+from yum.i18n import to_unicode, to_str
 
 from yum.update_md import UpdateMetadata
 
@@ -205,8 +205,12 @@ Display changelog data, since a specified time, on a group of packages"""
                 except ValueError:
                     msg = "Argument -- %s -- is not \"all\", a positive number or a date" % since
                     raise PluginYumExit(msg)
-                tt = self._since_dto.timetuple()
-                self._since_tt = time.mktime(tt)
+                try:
+                    tt = self._since_dto.timetuple()
+                    self._since_tt = time.mktime(tt)
+                except ValueError, e:
+                    msg = "Argument -- %s -- is not valid: %s" % (since, to_str(e))
+                    raise PluginYumExit(msg)
 
         ypl = base.returnPkgLists(extcmds)
         self.show_data(msg, ypl.installed, 'Installed Packages')


More information about the Yum-commits mailing list