]> git.notmuchmail.org Git - notmuch/commitdiff
python: Return a STATUS value in tags_to_flags and flags_to_tags
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Tue, 6 Dec 2011 11:38:52 +0000 (12:38 +0100)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Tue, 6 Dec 2011 11:38:52 +0000 (12:38 +0100)
We were not returning anything at all, which does not match the API
documentation. Fixed. Thanks to Patrick Totzke for the heads up.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
bindings/python/notmuch/message.py

index 2f0fd92471b862ff6afa142a15d4db056727c2f9..6ee5ec95e0bae524ba54f453f87335dad64da5eb 100644 (file)
@@ -758,11 +758,11 @@ class Message(object):
         not work yet, as the modified tags have not been committed yet
         to the database.
 
-        :returns: a :class:`STATUS`. In short, you want to see
+        :returns: a :class:`STATUS` value. In short, you want to see
             notmuch.STATUS.SUCCESS here. See there for details."""
         if self._msg is None:
             raise NotmuchError(STATUS.NOT_INITIALIZED)
-        status = Message._tags_to_maildir_flags(self._msg)
+        return Message._tags_to_maildir_flags(self._msg)
 
     def maildir_flags_to_tags(self):
         """Synchronize file Maildir flags to notmuch tags
@@ -789,7 +789,7 @@ class Message(object):
             notmuch.STATUS.SUCCESS here. See there for details."""
         if self._msg is None:
             raise NotmuchError(STATUS.NOT_INITIALIZED)
-        status = Message._tags_to_maildir_flags(self._msg)
+        return Message._tags_to_maildir_flags(self._msg)
 
     def __repr__(self):
         """Represent a Message() object by str()"""