Remove usage of colander.timeparse() function

that did very little, and has been removed in latest colander release
This commit is contained in:
Lance Edgar 2019-02-12 14:03:27 -06:00
parent d2629e8925
commit caec354092

View file

@ -56,12 +56,12 @@ class JQueryTime(colander.Time):
]
for fmt in formats:
try:
return colander.timeparse(cstruct, fmt)
return datetime.datetime.strptime(cstruct, fmt).time()
except ValueError:
pass
# re-try first format, for "better" error message
return colander.timeparse(cstruct, formats[0])
return datetime.datetime.strptime(cstruct, formats[0]).time()
class DateTimeBoolean(colander.Boolean):