Add AttributeError to to_cardinal_float

Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>
This commit is contained in:
William José Moreno Reyes
2019-10-25 19:38:55 -06:00
parent 4f116228b5
commit 601e8cee84

View File

@@ -139,7 +139,7 @@ class Num2Word_Base(object):
def to_cardinal_float(self, value): def to_cardinal_float(self, value):
try: try:
float(value) == value float(value) == value
except (ValueError, TypeError, AssertionError): except (ValueError, TypeError, AssertionError, AttributeError):
raise TypeError(self.errmsg_nonnum % value) raise TypeError(self.errmsg_nonnum % value)
pre, post = self.float2tuple(float(value)) pre, post = self.float2tuple(float(value))