]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/filenames.py
python: fix argument for filenames_destroy
[notmuch] / bindings / python / notmuch / filenames.py
index d201ae2207a652958b0c1473ddc89c5124990800..96b22c65360d2bee6f2748c8e00f033079f1a28d 100644 (file)
@@ -17,7 +17,7 @@ along with notmuch.  If not, see <http://www.gnu.org/licenses/>.
 Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de>
 """
 from ctypes import c_char_p
-from notmuch.globals import (
+from .globals import (
     nmlib,
     NotmuchMessageP,
     NotmuchFilenamesP,
@@ -123,12 +123,12 @@ class Filenames(Python3StringMixIn):
         return "\n".join(self)
 
     _destroy = nmlib.notmuch_filenames_destroy
-    _destroy.argtypes = [NotmuchMessageP]
+    _destroy.argtypes = [NotmuchFilenamesP]
     _destroy.restype = None
 
     def __del__(self):
         """Close and free the notmuch filenames"""
-        if self._files_p is not None:
+        if self._files_p:
             self._destroy(self._files_p)
 
     def __len__(self):