--- a/server/sqlutils.py Mon Apr 20 19:53:28 2009 +0200
+++ b/server/sqlutils.py Mon Apr 20 19:53:59 2009 +0200
@@ -218,6 +218,16 @@
value = crypt_password(value)
elif isinstance(value, Binary):
value = self.binary(value.getvalue())
+ # XXX <3.2 bw compat
+ elif type(value) is DateTimeType:
+ warn('found mx date time instance, please update to use datetime',
+ DeprecationWarning)
+ value = datetime(value.year, value.month, value.day,
+ value.hour, value.minute, int(value.second))
+ elif type(value) is DateTimeDeltaType:
+ warn('found mx date time instance, please update to use datetime',
+ DeprecationWarning)
+ value = timedelta(0, int(value.seconds), 0)
attrs[SQL_PREFIX+str(attr)] = value
return attrs