[POS-commit] Kiwi/Kiwi List.py,1.84,1.85
Christian Robottom Reis
kiko at async.com.br
Fri Oct 24 23:44:09 BRDT 2003
Update of /cvs/Kiwi/Kiwi
In directory anthem:/tmp/cvs-serv20392/Kiwi
Modified Files:
List.py
Log Message:
A slight bug presented itself when sorting dates with values of None and
a format string; we were passing a zero to strptime(), which hates
zeros. Changed the check to send back a "" if value is false, instead.
Index: List.py
===================================================================
RCS file: /cvs/Kiwi/Kiwi/List.py,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- List.py 15 Oct 2003 22:05:19 -0000 1.84
+++ List.py 24 Oct 2003 22:44:07 -0000 1.85
@@ -1279,7 +1279,8 @@
if self.date_formats.has_key(c):
f = self.date_formats[c]
s = strptime
- func = lambda x, c=c, s=s, f=f: (s(x["text"][c] or 0, f), x)
+ func = lambda x, c=c, s=s, f=f: (
+ x["text"][c] and s(x["text"][c], f) or "", x)
else:
# I wish DateTimeFrom didn't suck so much as a date
# conversion thing -- it often gets stuff wrong.
More information about the POS-commit
mailing list