Skip to content
Snippets Groups Projects
Commit 4bfc4a29 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

onelab python explicit pseudo-destructor (for code aster python)

parent 8692b7c7
No related branches found
No related tags found
No related merge requests found
...@@ -329,8 +329,13 @@ class client : ...@@ -329,8 +329,13 @@ class client :
self.setNumber('IsPyMetamodel',value=1,visible=0) self.setNumber('IsPyMetamodel',value=1,visible=0)
if self.action == "initialize": exit(0) if self.action == "initialize": exit(0)
def __del__(self) : def finalize(self) : #code aster python interpreter does not call the destructor at exit, it is necessary to call finalize() epxlicitely
self._wait_on_subclients()
if self.socket : if self.socket :
self._wait_on_subclients()
self._send(self._GMSH_STOP, 'Goodbye!') self._send(self._GMSH_STOP, 'Goodbye!')
self.socket.close() self.socket.close()
self.socket = None
def __del__(self) :
finalize()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment