dateutil.parser can also raise OverflowError
If the computed year is outside the Python range, an OverflowError is raised also. issue4635 review12001002
This commit is contained in:
1 parent
a04ad83400
commit
92dcb8fdcc
1 file changed
+2
-2
@@ -85,7 +85,7 @@ class Date(gtk.Entry):
|
||||
if text:
|
||||
try:
|
||||
date = date_parse(text, self.__format).date()
|
||||
except ValueError:
|
||||
except (ValueError, OverflowError):
|
||||
pass
|
||||
|
||||
self.__date = date
|
||||
@@ -268,7 +268,7 @@ class Time(gtk.ComboBoxEntry):
|
||||
if text:
|
||||
try:
|
||||
time = date_parse(text).time()
|
||||
except ValueError:
|
||||
except (ValueError, OverflowError):
|
||||
pass
|
||||
|
||||
self.__time = time
|
||||
|
||||
Reference in new issue
Block a user