Closed
Description
Hi,
when datemath gets an invalid argument, it can happen that None
is returned instead of an exception.
This is can lead to a weird NoneType if datemath.datemath
is used instead of datemath.parse
.
import datemath
type(datemath.parse("2")) # --> None
datemath.datemath("2") # AttributeError: 'NoneType' object has no attribute 'datetime'
I use version 1.5.2 (latest). It would be great if both cases could raise a parse exception.
Thanks,
Kai