[ptf]: EventDescriptor destructor fails with exception
nazariig opened this issue · comments
Nazarii Hnydyn commented
Summary
EventDescriptor class has a bug in destructor implementation.
It tries to access nonexistent system library and fails with the exception:
Exception AttributeError: "'NoneType' object has no attribute 'close'" in <bound method EventDescriptor.__del__ of <ptf.ptfutils.EventDescriptor instance at 0x7f18966645a8>> ignored
line: https://github.com/p4lang/ptf/blob/master/src/ptf/ptfutils.py#L52
Steps to reproduce
- Run PTF
Observed behavior
EventDescriptor destructor throws an exception
Expected behavior
EventDescriptor destructor should do a clean up gracefully
coididy commented
How to solve this problem? thank you!