Skip to content

Commit

Permalink
ignore repeasted session open(), fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dansan committed Nov 29, 2019
1 parent eae99f7 commit 1507d8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion udm_rest_client/base_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ def __init__(
self._client_task_limiter = asyncio.Semaphore(max_client_tasks)

def open(self) -> None:
if self._session:
return
self._client = openapi_client_udm.ApiClient(self.openapi_client_config)
self._session = self._client.rest_client.pool_manager

Expand Down Expand Up @@ -324,7 +326,7 @@ async def get_json(self, url: str, **kwargs) -> Dict[str, Any]:
elif 400 <= response.status <= 499:
raise NoObject(
f"UDM REST API returned status {response.status}, "
"reason {response.reason!r} for URL {url!r}.",
f"reason {response.reason!r} for URL {url!r}.",
dn=url,
module_name="<unknown>",
)
Expand Down

0 comments on commit 1507d8b

Please sign in to comment.