date.strftime doesn't like unicode strings tls-sprint
authorsylvain.thenault@logilab.fr
Fri, 27 Mar 2009 12:30:59 +0100
branchtls-sprint
changeset 1180 5536d4ee2bc3
parent 1179 70825477c6ce
child 1181 620ec8e6ae19
date.strftime doesn't like unicode strings
utils.py
--- a/utils.py	Fri Mar 27 12:30:19 2009 +0100
+++ b/utils.py	Fri Mar 27 12:30:59 2009 +0100
@@ -53,7 +53,7 @@
     """
     # date format may depend on the locale
     encoding = locale.getpreferredencoding(do_setlocale=False) or 'UTF-8'
-    return unicode(date.strftime(fmt), encoding)
+    return unicode(date.strftime(str(fmt)), encoding)
 
 def make_uid(key):
     """forge a unique identifier"""