diff options
author | Sebastian Spaeth <sebastian@sspaeth.de> | 2010-03-30 09:34:40 +0200 |
---|---|---|
committer | Sebastian Spaeth <sebastian@sspaeth.de> | 2010-03-30 09:34:40 +0200 |
commit | bac66abdd2a02c0af677c3e503ea3bae705287c6 (patch) | |
tree | 461985930febaa00e9701391892ef9ba56c2eb75 | |
parent | ad597b153c305fb50187e93416d0666b88cd7ace (diff) |
message.py: small doc changes and unused code removal
-rw-r--r-- | cnotmuch/message.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/cnotmuch/message.py b/cnotmuch/message.py index f98f787..ba93d8f 100644 --- a/cnotmuch/message.py +++ b/cnotmuch/message.py @@ -221,10 +221,8 @@ class Messages(object): raise NotmuchError next_indent = indent + 1 - + # get replies and print them also out (if there are any) replies = msg.get_replies() - # if isinstance(replies, types.NoneType): - # break if not replies is None: sys.stdout.write(set_sep) replies.print_messages(format, next_indent, entire_thread) @@ -651,17 +649,6 @@ class Message(object): email_msg = email.message_from_file(fp) fp.close() - # A subfunction to recursively unpack the message parts into a - # list. - # def msg_unpacker_gen(msg): - # if not msg.is_multipart(): - # yield msg - # else: - # for part in msg.get_payload(): - # for subpart in msg_unpacker_gen(part): - # yield subpart - # - # return list(msg_unpacker_gen(email_msg)) out = [] for msg in email_msg.walk(): if not msg.is_multipart(): @@ -669,6 +656,7 @@ class Message(object): return out def get_part(self, num): + """Returns the nth message body part""" parts = self.get_message_parts() if (num <= 0 or num > len(parts)): return "" |