moksha/lib/helpers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d1bd1edb86090ae2883db9ac8add702b39c41509
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 24 15:16:39 2010 -0400
Make our DateTimeDisplay a little more flexible
diff --git a/moksha/lib/helpers.py b/moksha/lib/helpers.py
index dc7fe42..cae8539 100644
--- a/moksha/lib/helpers.py
+++ b/moksha/lib/helpers.py
@@ -968,7 +968,7 @@ class DateTimeDisplay(object):
"""
def __init__(self, timestamp, format='%Y-%m-%d %H:%M:%S'):
- if '.' in timestamp:
+ if isinstance(timestamp, basestring) and '.' in timestamp:
timestamp = timestamp.split('.')[0]
self.timestamp = timestamp
if isinstance(timestamp, datetime):
Show replies by date