#21 crashes with maildir and python-2.5

closed-fixed
None
8
2007-10-22
2007-02-28
No

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.

Discussion

  • Anonymous - 2007-05-10

    archivemail-0.7.0-fpname.patch

     
  • Anonymous - 2007-05-10

    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

     
  • Nikolaus Schulz

    Nikolaus Schulz - 2007-10-22
    • priority: 5 --> 8
    • assigned_to: nobody --> nikosch
    • summary: archivemail python-2.5 fix --> crashes with maildir and python-2.5
    • status: open --> closed-fixed
     
  • Nikolaus Schulz

    Nikolaus Schulz - 2007-10-22

    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.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks