cli: Do not open file to then get its path and open it again.
The intent was getting a nice error message if file was not readable, but it causes a resource warning in python3 (file object being garbage- collected while open - wasn't that the beauty of automatic garbage collection to begin with ? It makes sense for writeable files as not closing may cause race conditions, but for read-only it's just annoying).
Showing
Please register or sign in to comment