Skip to content

Commit 3dfb879

Browse files
committed
Fix the incorrect handling of _URL_MAP
- remove the interference between HTTPProvider instances
1 parent d1a9a47 commit 3dfb879

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

iconsdk/providers/http_provider.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class HTTPProvider(Provider):
3333
The HTTPProvider takes the full URI where the server can be found.
3434
For local development this would be something like 'http://localhost:9000'.
3535
"""
36-
_URL_MAP = {}
3736

3837
@dispatch(str, int, dict=None)
3938
def __init__(self, base_domain_url: str, version: int, request_kwargs: dict = None):
@@ -70,8 +69,10 @@ def __init__(self, full_path_url: str, request_kwargs: dict = None):
7069
self._generate_url_map()
7170

7271
def _generate_url_map(self):
73-
self._URL_MAP['icx'] = "{0}/api/v{1}/{2}".format(self._serverUri, self._version, self._channel)
74-
self._URL_MAP['debug'] = "{0}/api/debug/v{1}/{2}".format(self._serverUri, self._version, self._channel)
72+
self._URL_MAP = {
73+
'icx': "{0}/api/v{1}/{2}".format(self._serverUri, self._version, self._channel),
74+
'debug': "{0}/api/debug/v{1}/{2}".format(self._serverUri, self._version, self._channel)
75+
}
7576

7677
@staticmethod
7778
def _get_channel(path: str):

0 commit comments

Comments
 (0)