patx / pickledb

pickleDB is an open source key-value store using Python's json module.
https://patx.github.io/pickledb
BSD 3-Clause "New" or "Revised" License
925 stars 125 forks source link

Allow loading of currently empty files #59

Closed PieterjanMontens closed 5 years ago

PieterjanMontens commented 5 years ago

In a testing environment, tempfile.mkstemp generates temporary empty files, automatically cleaned after test execution.

This modification allow pickledb to use these files, without hacks like writing random JSON in the generated file.