sol2 icon indicating copy to clipboard operation
sol2 copied to clipboard

single.py - ResourceWarning: unclosed file

Open gunlock opened this issue 7 months ago • 0 comments

Running single.py outputs a resource warning (ResourceWarning: unclosed file). The warning is due to calling os.popen() and not closing the returned file object.

The fix is to wrap the os.popen() calls in a with statement.

This fix has been tested on Linux and resolves the warning.

See #1689 fix.

gunlock avatar Apr 14 '25 21:04 gunlock