Message320326
| Author |
pablogsal |
| Recipients |
ezio.melotti, kuhlmann, matrixise, pablogsal, remi.lapeyre, rhettinger |
| Date |
2018年06月23日.19:28:36 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1529782116.3.0.56676864532.issue33927@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The current status of json.tool also leaks a file descriptor if you use the same filename or an invalid one (needs debug build to receive this error message):
$ ./python -m json.tool invalid_file.dat nofile.dat
Expecting value: line 1 column 1 (char 0)
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='nofile.dat' mode='w' encoding='UTF-8'>
$ ./python -m json.tool valid.dat valid.dat
Expecting value: line 1 column 1 (char 0)
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='valid.dat' mode='w' encoding='UTF-8'> |
|