Commit 3254e75d authored by Jérome Perrin's avatar Jérome Perrin

Formulator: stop trying to catch string exception

This was for Zope 2.7 and is invalid on py3
parent 2103bfe4
...@@ -863,9 +863,7 @@ class DateTimeValidator(Validator): ...@@ -863,9 +863,7 @@ class DateTimeValidator(Validator):
int(day), int(day),
hour, hour,
minute, timezone)) minute, timezone))
# ugh, a host of string based exceptions (not since Zope 2.7) except (DateError, TimeError):
except ('DateTimeError', 'Invalid Date Components', 'TimeError',
DateError, TimeError) :
self.raise_error('not_datetime', field) self.raise_error('not_datetime', field)
# pass value through request in order to be restored in case if validation fail # pass value through request in order to be restored in case if validation fail
if getattr(REQUEST, 'form', None): if getattr(REQUEST, 'form', None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment