X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fdatabase.py;h=9016f0ae997d0cac1ea54af54e3fb04d71c9ee78;hp=7f0091de583044b91d696f5646a15075a69c1d88;hb=d8c0e0c72dd19b50d51f07c70b880f21d69c2590;hpb=b4049316cc3bc933453268ed8d3e89b1ee0098a1 diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index 7f0091de..9016f0ae 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -273,6 +273,9 @@ class Database(object): notmuch database will reference the filename, and will not copy the entire contents of the file. + If the message contains Maildir flags, we will -depending on the + notmuch configuration- sync those tags to initial notmuch tags. + :returns: On success, we return 1) a :class:`Message` object that can be used for things @@ -310,11 +313,12 @@ class Database(object): filename, byref(msg_p)) - if not status in [STATUS.SUCCESS,STATUS.DUPLICATE_MESSAGE_ID]: + if not status in [STATUS.SUCCESS, STATUS.DUPLICATE_MESSAGE_ID]: raise NotmuchError(status) - #construct Message() and return + #construct Message(), sync initial tags from Maildir flags and return msg = Message(msg_p, self) + msg.maildir_flags_to_tags() return (msg, status) def remove_message(self, filename):