Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 46c6838

Browse files
author
Guillaume Dedrie
committed
[client] simplify session populate code on bootstrap
1 parent f6ce9d8 commit 46c6838

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pycti/api/opencti_api_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,9 @@ def __init__(
137137
"Authorization": "Bearer " + token,
138138
}
139139

140-
if auth is not None:
141-
self.session = requests.session()
140+
self.session = requests.session()
141+
if auth:
142142
self.session.auth = auth
143-
else:
144-
self.session = requests.session()
145143

146144
# Define the dependencies
147145
self.work = OpenCTIApiWork(self)

0 commit comments

Comments
 (0)