Comment 2 for bug 1035057

Revision history for this message
Stephen Turnbull (stephen-xemacs) wrote :

The following patch works around, but I don't think it's right. I suspect that something imported "datetime" where it should have imported mailman.utils.datetime or something like that.

--- src/mailman/model/pending.py 2012-04-26 02:08:22 +0000
+++ src/mailman/model/pending.py 2012-08-13 07:38:39 +0000
@@ -26,6 +26,7 @@
     ]

+import datetime
 import time
 import random
 import hashlib
@@ -128,6 +129,9 @@
                 # We expect this to be a list of strings.
                 value = ('mailman.model.pending.unpack_list\1' +
                          '\2'.join(value))
+ # #### Evile hack!!
+ elif type(value) is datetime.datetime:
+ value = unicode(value)
             keyval = PendedKeyValue(key=key, value=value)
             pending.key_values.add(keyval)
         store.add(pending)