The problem
The code had a case of a manual file handler pitfall, where a resource stream is opened manually and never closed.
This pitfall was detected using Pyling, which triggered a massage of code R1732 with the message "Consider using 'with' for resource-allocating operations"
The solution
Used a 'with' block to automatically close the open stream on the file just after it is no longer needed
The problem The code had a case of a manual file handler pitfall, where a resource stream is opened manually and never closed.
This pitfall was detected using Pyling, which triggered a massage of code R1732 with the message "Consider using 'with' for resource-allocating operations"
The solution Used a 'with' block to automatically close the open stream on the file just after it is no longer needed