diff options
author | Nikolaus Schulz <microschulz@web.de> | 2007-11-07 23:51:41 +0000 |
---|---|---|
committer | Nikolaus Schulz <microschulz@web.de> | 2007-11-07 23:51:41 +0000 |
commit | adf6515746be0882f08a4c1be1aa183111dc2eb1 (patch) | |
tree | 9316767885ff5c5676fd7e003e9390724e911631 | |
parent | 9439e1fa8afbcf634b6dd231736ba52c025d4550 (diff) | |
download | archivemail-adf6515746be0882f08a4c1be1aa183111dc2eb1.tar.gz archivemail-adf6515746be0882f08a4c1be1aa183111dc2eb1.tar.bz2 archivemail-adf6515746be0882f08a4c1be1aa183111dc2eb1.zip |
Added more debugging messages to the IMAP flag conversion.
-rwxr-xr-x | archivemail.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/archivemail.py b/archivemail.py index 6970c35..2e73ff9 100755 --- a/archivemail.py +++ b/archivemail.py @@ -866,7 +866,6 @@ def add_status_headers_imap(message, flags): """Add Status and X-Status headers to a message from an imap mailbox.""" status = "" x_status = "" - flags = list(flags) # convert from tuple for flag in flags: if flag == "\\Draft": # (draft): the user considers this message a draft pass # does this make any sense in mbox? @@ -886,13 +885,18 @@ def add_status_headers_imap(message, flags): # As with maildir folders, overwrite Status and X-Status headers # if they exist. del message['Status'] + vprint("converting imap status (%s)..." % " ".join(flags)) if status: - vprint("converting imap status into Status header '%s'" % status) + vprint("generating Status header '%s'" % status) message['Status'] = status + else: + vprint("not generating Status header") del message['X-Status'] if x_status: - vprint("converting imap status into X-Status header '%s'" % x_status) + vprint("generating X-Status header '%s'" % x_status) message['X-Status'] = x_status + else: + vprint("not generating X-Status header") def is_flagged(message): """return true if the message is flagged important, false otherwise""" |