Newline at end of JSON
This commit is contained in:
@@ -105,6 +105,7 @@ class Imager(object):
|
|||||||
with tempfile.NamedTemporaryFile(dir=self._db_dir, delete=False, mode='w') as fh:
|
with tempfile.NamedTemporaryFile(dir=self._db_dir, delete=False, mode='w') as fh:
|
||||||
try:
|
try:
|
||||||
json.dump(db, fh)
|
json.dump(db, fh)
|
||||||
|
fh.write('\n')
|
||||||
fh.flush()
|
fh.flush()
|
||||||
os.rename(fh.name, db_path)
|
os.rename(fh.name, db_path)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user