Mercurial > p > roundup > code
changeset 6486:8c371af7e785
Close file in blobfile.py storefile() method.
ResourceWarning raised by new tests.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 06 Sep 2021 14:25:24 -0400 |
| parents | 685778e0a122 |
| children | a101541fc494 |
| files | roundup/backends/blobfiles.py |
| diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/backends/blobfiles.py Mon Sep 06 13:44:42 2021 -0400 +++ b/roundup/backends/blobfiles.py Mon Sep 06 14:25:24 2021 -0400 @@ -332,7 +332,9 @@ # in multi-tracker (i.e. multi-umask) or modpython scenarios # the umask may have changed since last we set it. os.umask(self.umask) - open(name, 'wb').write(content) + fd = open(name, 'wb') + fd.write(content) + fd.close() def getfile(self, classname, nodeid, property): """Get the content of the file in the database.
