Do not crash on missing database
If database file is missing, e.g. it was previously on external storage and content of /srv
was not moved back, then dev-detect will crash with following stacktrace.
dev-detect-daemon[7447]: Traceback (most recent call last):
dev-detect-daemon[7447]: File "/usr/bin/dev-detect-daemon", line 11, in <module>
dev-detect-daemon[7447]: load_entry_point('dev-detect==0.3.1', 'console_scripts', 'dev-detect-daemon')()
dev-detect-daemon[7447]: File "/usr/lib/python3.7/site-packages/dev_detect/__main__.py", line 123, in main
dev-detect-daemon[7447]: File "/usr/lib/python3.7/site-packages/dev_detect/storage.py", line 12, in __init__
dev-detect-daemon[7447]: File "/usr/lib/python3.7/site-packages/dev_detect/storage.py", line 18, in _init_connection
dev-detect-daemon[7447]: sqlite3.OperationalError: unable to open database file
Instead of crashing, it should try to recreate folders and database, so it can start from scratch again.