Skip to content

Fix AttributeError in destructor

Ivan Sinkarenko requested to merge isinkare/pyjapc:fix/del-crash into master

Sample error:

Error in atexit.run_exitfuncs:
Traceback (most recent call last):
  File ".../python3.7/site-packages/pyjapc/japc.py", line 202, in __del__
    if self._selector is None:
AttributeError: 'PyJapc' object has no attribute '_selector'

Since destructor is called with atexit signal, given that the instance was garbage collected before the termination of the Python, this is a likely scenario.

Merge request reports