]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/database.py
python: avoid using a magic value for database mode in Database.__init__
[notmuch] / bindings / python / notmuch / database.py
index 504bb8804223fe94a502f9078eeee5dcaff01dae..c905395e74345b6a7c863571d1ef19e853084683 100644 (file)
@@ -122,7 +122,8 @@ class Database(object):
     _create.argtypes = [c_char_p]
     _create.restype = NotmuchDatabaseP
 
-    def __init__(self, path=None, create=False, mode=0):
+    def __init__(self, path = None, create = False,
+                 mode = MODE.READ_ONLY):
         """If *path* is `None`, we will try to read a users notmuch
         configuration and use his configured database. The location of the
         configuration file can be specified through the environment variable