mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Add AttributeError to to_cardinal_float
Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>
This commit is contained in:
@@ -139,7 +139,7 @@ class Num2Word_Base(object):
|
||||
def to_cardinal_float(self, value):
|
||||
try:
|
||||
float(value) == value
|
||||
except (ValueError, TypeError, AssertionError):
|
||||
except (ValueError, TypeError, AssertionError, AttributeError):
|
||||
raise TypeError(self.errmsg_nonnum % value)
|
||||
|
||||
pre, post = self.float2tuple(float(value))
|
||||
|
||||
Reference in New Issue
Block a user