Fix temp storage config
This commit is contained in:
parent
3fdd8859ce
commit
859a962aac
|
@ -1,2 +1,4 @@
|
||||||
[global]
|
[global]
|
||||||
|
# Persistent file for storage of times, in .json format.
|
||||||
|
# Remove or leave empty for temporary (/tmp/ftracker-db.json) storage
|
||||||
db_file = db.json
|
db_file = db.json
|
||||||
|
|
|
@ -9,7 +9,8 @@ if not config:
|
||||||
|
|
||||||
|
|
||||||
from tinydb import TinyDB
|
from tinydb import TinyDB
|
||||||
db = TinyDB(config.get('global','db_file', fallback='/tmp/ftracker-db.json'), indent=4)
|
dbfile = config['global'].get('db_file') or '/tmp/ftracker-db.json'
|
||||||
|
db = TinyDB(dbfile, indent=4)
|
||||||
# TODO: Load name list if needed
|
# TODO: Load name list if needed
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue