Browse Source

Raises if can't find DB file

Maxime Alves LIRMM@home 3 years ago
parent
commit
7eea924834
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      pyheatpump/db.py

+ 3
- 0
pyheatpump/db.py View File

@@ -76,6 +76,9 @@ class DB():
76 76
             except sqlite3.IntegrityError as e:
77 77
                 print(e)
78 78
                 return []
79
+            except sqlite3.OperationalError as e:
80
+                raise Exception('Can\'t find DB file %s'.format(filename)) from e
81
+
79 82
 
80 83
 
81 84
 class RowClass(object):

Loading…
Cancel
Save