Check for writable database before starting
This commit is contained in:
parent
3da96a3ef8
commit
f9044daba1
2 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,7 @@ and this project tries to adhere to [Semantic Versioning](https://semver.org/spe
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
* Create missing PRAGMA values for Loop SQLite database, fixing failing import
|
* Create missing PRAGMA values for Loop SQLite database, fixing failing import
|
||||||
|
* Check for database existing and able to connect to before doing any writing
|
||||||
|
|
||||||
## [0.3.1] - 2021-09-30
|
## [0.3.1] - 2021-09-30
|
||||||
|
|
||||||
|
|
3
run.py
3
run.py
|
@ -11,6 +11,9 @@ import sys
|
||||||
|
|
||||||
def migrate(data: NomieImport):
|
def migrate(data: NomieImport):
|
||||||
db = schema.migrate("output.db")
|
db = schema.migrate("output.db")
|
||||||
|
if not db:
|
||||||
|
raise ConnectionError
|
||||||
|
|
||||||
if data.trackers is not None:
|
if data.trackers is not None:
|
||||||
|
|
||||||
habitlist = habits.migrate(db, data.trackers)
|
habitlist = habits.migrate(db, data.trackers)
|
||||||
|
|
Loading…
Reference in a new issue