Browse Source

Fix issue where bulkdata was accidentally closed

tags/nilmdb-1.4.4
Jim Paris 11 years ago
parent
commit
6f14d609b2
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      nilmdb/server/nilmdb.py

+ 2
- 1
nilmdb/server/nilmdb.py View File

@@ -119,8 +119,9 @@ class NilmDB(object):
self.con = sqlite3.connect(sqlfilename, check_same_thread = True)
try:
self._sql_schema_update()
finally: # pragma: no cover
except Exception: # pragma: no cover
self.data.close()
raise

# See big comment at top about the performance implications of this
self.con.execute("PRAGMA synchronous=NORMAL")


Loading…
Cancel
Save