X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fdirectory.py;h=ae115f818be2c22395531e454dc51ab907405f3c;hb=162687a99e412098729d639ed7bc27f01372cb84;hp=b679aa293dc21006a06102e612e2cbca631ceb19;hpb=df0e1cf7884f93bbbf70786d0bffc45824ae01c1;p=obsolete%2Fnotmuch-old
diff --git a/bindings/python/notmuch/directory.py b/bindings/python/notmuch/directory.py
index b679aa29..ae115f81 100644
--- a/bindings/python/notmuch/directory.py
+++ b/bindings/python/notmuch/directory.py
@@ -14,17 +14,19 @@ for more details.
You should have received a copy of the GNU General Public License
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 (
nmlib,
+ NotmuchDirectoryP,
+ NotmuchFilenamesP
+)
+from .errors import (
STATUS,
NotmuchError,
NotInitializedError,
- NotmuchDirectoryP,
- NotmuchFilenamesP
)
from .filenames import Filenames
@@ -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)