Skip to content

Commit

Permalink
PAPP-34631: fixing linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tapishj-splunk committed Nov 19, 2024
1 parent 5dd99bd commit cc235b0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ciscotalosintelligence_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ def _make_rest_call(self, retry, endpoint, action_result, method="get", **kwargs
temp_file.write(cert)
temp_file.seek(0) # Move the file pointer to the beginning for reading
temp_file_path = temp_file.name # Get the name of the temporary file
self.client = httpx.Client(http2=True, verify=config.get("verify_server_cert", False), cert=temp_file_path, timeout=MAX_REQUEST_TIMEOUT)
self.client = httpx.Client(
http2=True, verify=config.get("verify_server_cert", False), cert=temp_file_path, timeout=MAX_REQUEST_TIMEOUT
)

if os.path.exists(temp_file_path):
os.remove(temp_file_path)
Expand Down Expand Up @@ -480,7 +482,9 @@ def insert_newlines(string, every=64):

# exceptions shouldn't really be thrown here because most network related disconnections will happen when a request is sent
try:
self.client = httpx.Client(http2=True, verify=config.get("verify_server_cert", False), cert=temp_file_path, timeout=MAX_REQUEST_TIMEOUT)
self.client = httpx.Client(
http2=True, verify=config.get("verify_server_cert", False), cert=temp_file_path, timeout=MAX_REQUEST_TIMEOUT
)
except Exception as e:
self.debug_print(f"Could not connect to server because of {e}")
if os.path.exists(temp_file_path):
Expand Down

0 comments on commit cc235b0

Please sign in to comment.