Skip to content

Commit

Permalink
ignore errors during session cleanup (#103)
Browse files Browse the repository at this point in the history
Co-authored-by: Rathish Cholarajan <[email protected]>
  • Loading branch information
daka1510 and rathishcholarajan authored Jan 20, 2022
1 parent a6a7ace commit a21ce0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qiskit_ibm_runtime/api/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ def __init__(

def __del__(self) -> None:
"""RetrySession destructor. Closes the session."""
self.close()
try:
self.close()
except Exception: # pylint: disable=broad-except
# ignore errors that may happen during cleanup
pass

def _initialize_retry(
self, retries_total: int, retries_connect: int, backoff_factor: float
Expand Down

0 comments on commit a21ce0e

Please sign in to comment.