Skip to content

Commit 3b49b78

Browse files
committed
fix deprecated use of Session() object
1 parent e80886a commit 3b49b78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

illumio_pylo/API/APIConnector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ def __init__(self, fqdn: str, port, api_user: str, api_key: str, skip_ssl_cert_c
6969
if type(port) is int:
7070
port = str(port)
7171
self.port: int = port
72-
self._api_key: str = api_key
73-
self._decrypted_api_key: Optional[str] = None
7472
self.api_user: str = api_user
73+
self._api_key: str = api_key
74+
self._decrypted_api_key: Optional[str] = None # if api_key is encrypted, this will hold the decrypted value after first use
7575
self.org_id: int = org_id
7676
self.skipSSLCertCheck: bool = skip_ssl_cert_check
7777
self.version: Optional['pylo.SoftwareVersion'] = None
7878
self.version_string: str = "Not Defined"
79-
self._cached_session = requests.session()
79+
self._cached_session = requests.sessions.Session()
8080

8181
@property
8282
def api_key(self):

0 commit comments

Comments
 (0)