Commits

Andriy Kornatskyy committed 1561d81

Fixed compatibility issue with python2.4: TypeError: strftime() argument 1 must be str, not unicode

Comments (0)

Files changed (1)

src/wheezy/html/builder.py

     """
     if date.min == value:
         return ''
-    return value.strftime(format_string or '%Y/%m/%d')
+    return value.strftime(str(format_string or '%Y/%m/%d'))
 
 
 def datetime_format_provider(value, format_string=None):
     """
     if datetime.min == value:
         return ''
-    return value.strftime(format_string or '%Y/%m/%d %H:%M')
+    return value.strftime(str(format_string or '%Y/%m/%d %H:%M'))
 
 
 format_providers = {