From 9b79f815664b9088816974f4d6d3755225ff0030 Mon Sep 17 00:00:00 2001 From: Gustavo Lepri Date: Sun, 12 Jul 2020 19:10:09 -0300 Subject: [PATCH] Removed slash ('/') at the end of URL for python 3.8 compatibility When we're using Python 3.8 we get a duplicated path when URL ends with '/'. i.e.: 'https://api.iugu.com/v1/customers/customers' --- iugu/iuguapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iugu/iuguapi.py b/iugu/iuguapi.py index fe04b16..5350bfe 100644 --- a/iugu/iuguapi.py +++ b/iugu/iuguapi.py @@ -44,7 +44,7 @@ def delete(self, url): return self.base_request(url, 'DELETE') def make_url(self, paths): - url = 'https://api.iugu.com/v1/' + url = 'https://api.iugu.com/v1' for path in paths: url = re.sub(r'/?$', re.sub(r'^/?', '/', str(path)), url) return url