]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/filename.py
version: bump to 0.11.1
[notmuch] / bindings / python / notmuch / filename.py
index 6b332a92a1733ce11793a7a1e514ec75bc181153..f7313ec5ae856ccb008fe5ce16461e67e875faed 100644 (file)
@@ -69,7 +69,7 @@ class Filenames(object):
              reference to it, so we can automatically delete the db object
              once all derived objects are dead.
         """
-        if files_p is None:
+        if not files_p:
             raise NotmuchError(STATUS.NULL_POINTER)
 
         self._files = files_p
@@ -99,6 +99,9 @@ class Filenames(object):
         self._files = None
 
     def __str__(self):
+        return unicode(self).encode('utf-8')
+
+    def __unicode__(self):
         """Represent Filenames() as newline-separated list of full paths
 
         .. note:: As this iterates over the filenames, we will not be