Close data files after reading
authorJeremy Stanley <fungi@yuggoth.org>
Sun, 15 Aug 2021 15:10:18 +0000 (15:10 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sun, 15 Aug 2021 15:58:24 +0000 (15:58 +0000)
Starting with Python 3.8, the interpreter raises a ResourceWarning
exception during garbage collection if it finds an unclosed file
descriptor. Because of where this exception gets raised, it's
ignored (but a warning is emitted on stderr).

Use a typical context block in our loop to load data files, so that
this condition won't occur.


No differences found