pypco icon indicating copy to clipboard operation
pypco copied to clipboard

fix: fixed teardown of PCO class where authentication failed

Open 2000game opened this issue 2 years ago • 0 comments

When tearing down an PCO class, that was initialized without parameters, first an PCOCredentialsexception error occurs. When that is catched, an AttributeError occurs, because during teardown it tries to close the session which won't hasn't been defined yet.

.....Exception ignored in: <function PCO.__del__ at 0x7fdb3dc83ee0>
Traceback (most recent call last):
  File "/home/fk/pypco/pypco/pco.py", line 539, in __del__
    if self.session is not None:
AttributeError: 'PCO' object has no attribute 'session'

2000game avatar Jul 01 '23 00:07 2000game