Closed fralau closed 5 years ago
This is a legit issue, most likely caused by not closing mkstemp
. I cannot see where that is closed.
https://github.com/osquery/osquery-python/issues/66 seems related.
This will open a descriptor and should be closed: https://github.com/osquery/osquery-python/blob/master/osquery/management.py#L74
I am using a SpawnInstance as an object within a class. Unfortunately
Apparently the SpawnInstance object leaves three resources open on exit and this triggers Python 3 warnings:
I tried to force a call to the
__del__
function of the instance, but this does not prevent the warning. Unfortunately this warning is difficult to mask, because the source is somewhere likely in a thread.I am puzzled because the fowlling code does not trigger the ResourceWarning on exit:
Any idea what's happening?