-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: close file properly in indexer_dbm.py:save_index()
Fix this error found in debug logs of gentoo packaging of round 2.2.0. /roundup/backends/indexer_dbm.py:253: ResourceWarning: unclosed file <_io.BufferedWriter name='test-index/indexes/index.db-'> open(self.indexdb+'-', 'wb').write(zlib.compress(marshal.dumps(dbfil))) Also added test that calls save_index(), reloads the index and tests that the original item. I am not sure how Gentoo hit this But they were missing a number of backends. So it's possible that indexer_dbm.py is not getting fully tested depending on what is installed on the system. Codecov from CI didnt show indexer_dbm.py:save_index() being covered.
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
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