X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fmessage.py;h=4ec5147b55115bc2db1a2b26339bcb019e0ee99c;hb=162687a99e412098729d639ed7bc27f01372cb84;hp=20ba9cb918cbca07d05a4266d63a02898895334d;hpb=69f077898a65c10453d08dd94bf4c94efc69b91b;p=notmuch diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index 20ba9cb9..4ec5147b 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -14,7 +14,7 @@ for more details. You should have received a copy of the GNU General Public License along with notmuch. If not, see . -Copyright 2010 Sebastian Spaeth ' +Copyright 2010 Sebastian Spaeth Jesse Rosenthal """ @@ -26,17 +26,19 @@ from .globals import ( Enum, _str, Python3StringMixIn, - STATUS, - NotmuchError, - NullPointerError, - NotInitializedError, NotmuchTagsP, NotmuchMessageP, NotmuchMessagesP, NotmuchFilenamesP, ) +from .errors import ( + STATUS, + NotmuchError, + NullPointerError, + NotInitializedError, +) from .tag import Tags -from .filename import Filenames +from .filenames import Filenames import email try: @@ -257,7 +259,7 @@ class Message(Python3StringMixIn): files_p = Message._get_filenames(self._msg) - return Filenames(files_p, self).as_generator() + return Filenames(files_p, self) def get_flag(self, flag): """Checks whether a specific flag is set for this message @@ -739,5 +741,5 @@ class Message(Python3StringMixIn): def __del__(self): """Close and free the notmuch Message""" - if self._msg is not None: + if self._msg: self._destroy(self._msg)