archivemail doesn't work 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. According to "What's new in Python 2.5" the mailbox module underwent a massive rewrite so I won't be surprised if there are some other problems but I guess upstream is responsible for those :-) Regards, Ali
Created attachment 105971 [details, diff] archivemail-0.7.0-fpname.patch
Ali, sorry for the late reply. Can you please report this upstream and keep us up-to-date? http://sourceforge.net/tracker/?group_id=49630 Thanks.
can we get this fix on the tree now ? Or you need some help ?
(In reply to comment #2) > Ali, sorry for the late reply. > > Can you please report this upstream and keep us up-to-date? > http://sourceforge.net/tracker/?group_id=49630 > > Thanks. > Done http://sourceforge.net/tracker/index.php?func=detail&aid=1670422&group_id=49630&atid=456910
Created attachment 118726 [details, diff] archivemail-0.7.0-fpname.patch There are two more message.fp.name calls in is_flagged() and is_unread() which I haven't noticed as they were hidden in try/except blocks. The updated patch fixes them and uses sys.hexversion instead of the ugly sys.version_info[1] P.S.: The upstream doesn't seem to respond to the bug report and as python-2.5 is hopefully getting unmasked soon maybe we should just fix this in the tree ;)
Created attachment 118737 [details, diff] fixed patch my apologies.. forgot to fix one in _archive_dir()
(In reply to comment #5) > Created an attachment (id=118726) [edit] > archivemail-0.7.0-fpname.patch > > There are two more message.fp.name calls in is_flagged() and is_unread() which > I haven't noticed as they were hidden in try/except blocks. The updated patch > fixes them and uses sys.hexversion instead of the ugly sys.version_info[1] > > P.S.: The upstream doesn't seem to respond to the bug report and as python-2.5 > is hopefully getting unmasked soon maybe we should just fix this in the tree ;) Yes, i've been watching the upstream bug too. Anyhow send the new patch upstream too, please. I'll fix the ebuild in the tree in the next 24 hours. I asked Grant to take a look at the patch some time ago (as I don't know much about python and its changes from 2.4 to 2.5).
(In reply to comment #7) > > Yes, i've been watching the upstream bug too. Anyhow send the new patch > upstream too, please. done
Commited. Thanks :)