Message(): add 'match' result in text output. Fix is_match to use class, not instance...
authorSebastian Spaeth <sebastian@sspaeth.de>
Thu, 25 Mar 2010 14:55:23 +0000 (15:55 +0100)
committerSebastian Spaeth <sebastian@sspaeth.de>
Thu, 25 Mar 2010 14:55:23 +0000 (15:55 +0100)
cnotmuch/message.py

index 29a914dd70103abae7f28da7f63e4f36e3c8b0ca..411d84da93b9a5a8006f13a617d5e1fda0056be3 100644 (file)
@@ -627,7 +627,7 @@ class Message(object):
 
     def is_match(self):
         """(Not implemented)"""
-        return self.get_flag(self.FLAG.MATCH)
+        return self.get_flag(Message.FLAG.MATCH)
 
     def __str__(self):
         """A message() is represented by a 1-line summary"""
@@ -716,9 +716,8 @@ class Message(object):
         easy to change to a new format when the format changes."""
 
         format = self.format_message_internal()
-        output = "\n\fmessage{ id:%s depth:%d filename:%s" % (format["id"],
-                                                              indent,
-                                                              format["filename"])
+        output = "\n\fmessage{ id:%s depth:%d match:%d filename:%s" \
+                 % (format['id'], indent, format['match'], format['filename'])
         output += "\n\fheader{"
 
         #Todo: this date is supposed to be cleaned up, as in the index.