[issue2551161] Handle ResourceWarnings when running with -W default
John Rouillard <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
New submission from John Rouillard:
When running tracker with python -W default I get a lot of errors like:
ResourceWarning: unclosed file <_io.TextIOWrapper name='.../demo/html/issue.process.html'
mode='r' encoding='UTF-8'>
Looks like engine_zopetal.py's load() method is opening file for processing and not
closing. Looks like instance.py's _compile routine is doing the same.
Also an mo file is not closed in the i18n.py get_translation() function.
Fix by adding 'with open' clause for the first two and closing the file in the last case.
----------
assignee: rouilj
components: API, Interface, Web interface
messages: 7341
nosy: rouilj
priority: normal
severity: normal
status: new
title: Handle ResourceWarnings when running with -W default
type: behavior
versions: devel
_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551161>
_________________________________________________