From 06263ea9496685724b22ed9e1c13ed347976b3b5 Mon Sep 17 00:00:00 2001 From: David Robles Date: Fri, 15 Nov 2019 14:22:58 -0800 Subject: [PATCH] Always return a string in APIError.__str__ --- googlemaps/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemaps/exceptions.py b/googlemaps/exceptions.py index 679b26c3..0a0f116a 100644 --- a/googlemaps/exceptions.py +++ b/googlemaps/exceptions.py @@ -27,7 +27,7 @@ def __init__(self, status, message=None): def __str__(self): if self.message is None: - return self.status + return str(self.status) else: return "%s (%s)" % (self.status, self.message)