X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fdirectory.py;h=b30c9e35e6427322630e0c7afd118e97e09484f0;hb=3e2e724d53a1dce3ba00a20c71b2e6f735678136;hp=b679aa293dc21006a06102e612e2cbca631ceb19;hpb=df0e1cf7884f93bbbf70786d0bffc45824ae01c1;p=notmuch
diff --git a/bindings/python/notmuch/directory.py b/bindings/python/notmuch/directory.py
index b679aa29..b30c9e35 100644
--- a/bindings/python/notmuch/directory.py
+++ b/bindings/python/notmuch/directory.py
@@ -12,19 +12,21 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
-along with notmuch. If not, see .
+along with notmuch. If not, see .
-Copyright 2010 Sebastian Spaeth '
+Copyright 2010 Sebastian Spaeth
"""
from ctypes import c_uint, c_long
-from notmuch.globals import (
+from .globals import (
nmlib,
+ NotmuchDirectoryP,
+ NotmuchFilenamesP
+)
+from .errors import (
STATUS,
NotmuchError,
NotInitializedError,
- NotmuchDirectoryP,
- NotmuchFilenamesP
)
from .filenames import Filenames
@@ -91,7 +93,7 @@ class Directory(object):
* Read the mtime of a directory from the filesystem
- * Call :meth:`Database.add_message` for all mail files in
+ * Call :meth:`Database.index_file` for all mail files in
the directory
* Call notmuch_directory_set_mtime with the mtime read from the
@@ -175,9 +177,9 @@ class Directory(object):
_destroy = nmlib.notmuch_directory_destroy
_destroy.argtypes = [NotmuchDirectoryP]
- _destroy.argtypes = None
+ _destroy.restype = None
def __del__(self):
"""Close and free the Directory"""
- if self._dir_p is not None:
+ if self._dir_p:
self._destroy(self._dir_p)