Skip to content

Commit

Permalink
FIX: Close on exit unless asked not to (#5292)
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys authored Oct 14, 2024
1 parent 6fc7b7d commit 71d63c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ansys/aedt/core/desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,9 @@ def __init__(
# save the current desktop session in the database
_desktop_sessions[self.aedt_process_id] = self

# Register the desktop closure to be called at exit.
atexit.register(self.close_desktop)
# Register the desktop closure to be called at exit unless asked not not.
if close_on_exit:
atexit.register(self.close_desktop)

def __enter__(self):
return self
Expand Down

0 comments on commit 71d63c7

Please sign in to comment.