From: SourceForge.net <no...@so...> - 2007-10-22 22:14:48
|
Bugs item #1670422, was opened at 2007-02-28 01:00 Message generated for change (Comment added) made by nikosch You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456910&aid=1670422&group_id=49630 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed >Priority: 8 Private: No Submitted By: Ali Polatel (hawking2) >Assigned to: Nikolaus Schulz (nikosch) >Summary: crashes with maildir and python-2.5 Initial Comment: archivemail have problems running with python-2.5 Here is the traceback: hawking@mars:~ archivemail -d 5 .maildir/local Traceback (most recent call last): File "/usr/bin/archivemail", line 1469, in <module> main() File "/usr/bin/archivemail", line 687, in main archive(mailbox_path) File "/usr/bin/archivemail", line 1130, in archive _archive_dir(mailbox_name, final_archive_name, "maildir") File "/usr/bin/archivemail", line 1270, in _archive_dir add_status_headers(msg) File "/usr/bin/archivemail", line 809, in add_status_headers match = re.search(":2,(.+)$", message.fp.name) AttributeError: _ProxyFile instance has no attribute 'name' .maildir/local is a Maildir and message is a rfc822.Message instance. In python2.4 message.fp.name gives the path of the file where this message is stored. In python2.5 this doesn't exist but same info is avaliable from 'message.fp._file.name' I've written a patch for archivemail-0.7.0 to check for python version and decide whether to use message.fp.name or message.fp._file.name and the tool seems to work fine. ---------------------------------------------------------------------- >Comment By: Nikolaus Schulz (nikosch) Date: 2007-10-23 00:14 Message: Logged In: YES user_id=1594781 Originator: NO Thanks for pointing that out, that's indeed a rather major problem. A fix is now in Subversion. ---------------------------------------------------------------------- Comment By: Ali Polatel (hawking2) Date: 2007-05-10 11:38 Message: Logged In: YES user_id=1671462 Originator: YES Here is an updated patch fixing is_flagged and is_unread too File Added: archivemail-0.7.0-fpname.patch ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456910&aid=1670422&group_id=49630 |