[yum-commits] plugins/changelog
James Antill
james at osuosl.org
Tue Nov 25 23:04:39 UTC 2008
plugins/changelog/changelog.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 7cccccd5d8b1f202086c05aa78fb5a544a595a2b
Author: James Antill <james at and.org>
Date: Tue Nov 25 17:59:25 2008 -0500
Don't traceback on "changelog 0" and give a nice message.
diff --git a/plugins/changelog/changelog.py b/plugins/changelog/changelog.py
index 2be0477..1f22f04 100644
--- a/plugins/changelog/changelog.py
+++ b/plugins/changelog/changelog.py
@@ -176,7 +176,11 @@ Display changelog data, since a specified time, on a group of packages"""
if dateutil_parser is None:
msg = "Dateutil module not available, so can't parse dates"
raise PluginYumExit(msg)
- self._since_dto = dateutil_parser.parse(since, fuzzy=True)
+ try:
+ self._since_dto = dateutil_parser.parse(since, fuzzy=True)
+ 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)
More information about the Yum-commits
mailing list