ptf icon indicating copy to clipboard operation
ptf copied to clipboard

[ptf]: EventDescriptor destructor fails with exception

Open nazariig opened this issue 5 years ago • 1 comments

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

nazariig avatar Feb 15 '20 15:02 nazariig

How to solve this problem? thank you!

coididy avatar Jul 21 '21 07:07 coididy