]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/directory.py
python: bump SOVERSION to 5
[notmuch] / bindings / python / notmuch / directory.py
index 3e0763f256660f06a7550ffd3de656b458ab9f65..7f86b1ac15588aac8836d3bd31dcb5a3a945dc0c 100644 (file)
@@ -12,21 +12,23 @@ 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 <http://www.gnu.org/licenses/>.
+along with notmuch.  If not, see <https://www.gnu.org/licenses/>.
 
-Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de>'
+Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de>
 """
 
 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)