]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/filename.py
use __unicode__ for string representation
[notmuch] / bindings / python / notmuch / filename.py
index 6b332a92a1733ce11793a7a1e514ec75bc181153..a7cd7e63d44bf03076b5e21087e77ae425761a7a 100644 (file)
@@ -99,6 +99,9 @@ class Filenames(object):
         self._files = None
 
     def __str__(self):
         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
         """Represent Filenames() as newline-separated list of full paths
 
         .. note:: As this iterates over the filenames, we will not be