X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fdirectory.py;h=3b0a525dc9083e2c6bcb6c019fa729f42d389fd7;hb=9a1ab6c48748ee6259cd888d5486d84c69f424cb;hp=3e0763f256660f06a7550ffd3de656b458ab9f65;hpb=ba95980cf1a5e2b32104611ccdf2e9c43bf3305a;p=notmuch
diff --git a/bindings/python/notmuch/directory.py b/bindings/python/notmuch/directory.py
index 3e0763f2..3b0a525d 100644
--- a/bindings/python/notmuch/directory.py
+++ b/bindings/python/notmuch/directory.py
@@ -14,19 +14,21 @@ 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 (
+from .globals import (
nmlib,
+ NotmuchDirectoryP,
+ NotmuchFilenamesP
+)
+from .errors import (
STATUS,
NotmuchError,
NotInitializedError,
- NotmuchDirectoryP,
- NotmuchFilenamesP
)
-from .filename import Filenames
+from .filenames import Filenames
class Directory(object):
"""Represents a directory entry in the notmuch directory
@@ -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)