]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/database.py
python: more error handling fixes
[notmuch] / bindings / python / notmuch / database.py
index 0958ce0ad8499f8f699391c356819b2fe14a65a7..6edb18b69d845514dbbe5ad9e7a960e96ad4b184 100644 (file)
@@ -159,7 +159,7 @@ class Database(object):
 
     def _assert_db_is_initialized(self):
         """Raises :exc:`NotInitializedError` if self._db is `None`"""
-        if self._db is None:
+        if not self._db:
             raise NotInitializedError()
 
     def create(self, path):