]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/database.py
python: fix NULL pointer tests
[notmuch] / bindings / python / notmuch / database.py
index 0ac8b06a35f15c1965e3cf1e8d6c1bab7a3909c3..525f7c9a0ca9d0b2a933faa26185e3671e736e8f 100644 (file)
@@ -189,7 +189,7 @@ class Database(object):
         :raises: :exc:`NotmuchError` in case of any failure
                     (possibly after printing an error message on stderr).
         """
-        if self._db is not None:
+        if self._db:
             raise NotmuchError(message="Cannot create db, this Database() "
                                        "already has an open one.")