From 601e8cee848ee1ba382827a9d59853519383d7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Jos=C3=A9=20Moreno=20Reyes?= Date: Fri, 25 Oct 2019 19:38:55 -0600 Subject: [PATCH] Add AttributeError to to_cardinal_float MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: William José Moreno Reyes --- num2words/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/num2words/base.py b/num2words/base.py index 025e014..ccf5248 100644 --- a/num2words/base.py +++ b/num2words/base.py @@ -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))