Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve file handling: avoid "unclosed file" warnings
Backported from python 3 changes, where this warning shows up: ResourceWarning: unclosed file <_io.BufferedReader name='.../bogus.conf'> Changes: - Refactored parse_conf(), write_conf() into separate file+stream and stream- only (backend) functions so that all file open requests are properly handed in a 'with' block. - Improved file handling of the TestWorkDir and other unit-testing helpers
- Loading branch information
Showing
4 changed files
with
49 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters