should use time here, not timedelta stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 19 Jun 2009 08:23:45 +0200
branchstable
changeset 2118 0012d997b992
parent 2117 b451bd56c9cd
child 2119 dc1eedd06766
should use time here, not timedelta
devtools/fill.py
--- a/devtools/fill.py	Fri Jun 19 08:23:23 2009 +0200
+++ b/devtools/fill.py	Fri Jun 19 08:23:45 2009 +0200
@@ -10,7 +10,7 @@
 
 from random import randint, choice
 from copy import deepcopy
-from datetime import datetime, date, timedelta
+from datetime import datetime, date, time#timedelta
 from decimal import Decimal
 
 from yams.constraints import (SizeConstraint, StaticVocabularyConstraint,
@@ -163,7 +163,7 @@
 
     def generate_time(self, attrname, index):
         """generates a random time (format is ' HH:MM')"""
-        return timedelta(0, 11, index%60) #'11:%02d' % (index % 60)
+        return time(11, index%60) #'11:%02d' % (index % 60)
 
     def generate_datetime(self, attrname, index):
         """generates a random date (format is 'yyyy-mm-dd HH:MM')"""