utils/cloneByDate.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 7e066ddf8b08acc67f2f0eab80545edf600ed728
Author: Stephen Herr <sherr(a)redhat.com>
Date: Wed May 23 15:17:07 2012 -0400
824583 - spacewalk-clone-by-date failes with TypeError when on Postgres database.
The Postgres database returns a datetime object with a timezone, whereas oracle
returnes one without.
The tool then tries to comparte it with a datetime that has no timezone info, which
is illegal. The fix is to simply compare date objects instead of datetime objects. This is
safe because Errata release time are actually dates, there is no time associated with
them.
diff --git a/utils/cloneByDate.py b/utils/cloneByDate.py
index f93e964..c4f0fe1 100644
--- a/utils/cloneByDate.py
+++ b/utils/cloneByDate.py
@@ -503,7 +503,7 @@ class ChannelCloner:
to_clone = []
for err in available_errata:
- if err['issue_date'] <= self.to_date:
+ if err['issue_date'].date() <= self.to_date.date():
to_clone.append(err)
return (to_clone, available_errata)
Show replies by date