diff --git a/CHANGELOG.md b/CHANGELOG.md index cfe3032..2f2b3bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project tries to adhere to [Semantic Versioning](https://semver.org/spe ### Fixed * 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 diff --git a/run.py b/run.py index 26e7e10..4456f1a 100755 --- a/run.py +++ b/run.py @@ -11,6 +11,9 @@ import sys def migrate(data: NomieImport): db = schema.migrate("output.db") + if not db: + raise ConnectionError + if data.trackers is not None: habitlist = habits.migrate(db, data.trackers)