avoid deprecation warning tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 10 Mar 2009 15:18:04 +0100
branchtls-sprint
changeset 1026 4c097dbaf560
parent 1025 aebf37f460c1
child 1031 1a89683cb687
avoid deprecation warning
server/sqlutils.py
--- a/server/sqlutils.py	Tue Mar 10 15:17:55 2009 +0100
+++ b/server/sqlutils.py	Tue Mar 10 15:18:04 2009 +0100
@@ -164,11 +164,11 @@
                     warn('found mx date time instance, please update to use datetime',
                          DeprecationWarning)
                     val = datetime(val.year, val.month, val.day,
-                                   val.hour, val.minute, val.second)
+                                   val.hour, val.minute, int(val.second))
                 elif type(val) is DateTimeDeltaType:
                     warn('found mx date time instance, please update to use datetime',
                          DeprecationWarning)
-                    val = timedelta(0, val.seconds, 0)
+                    val = timedelta(0, int(val.seconds), 0)
                 args[key] = val
             # should not collide
             args.update(query_args)