jamesridgway / attachment-downloader

Simple tool for downloading email attachments for all emails in a given folder using an IMAP client
MIT License
85 stars 39 forks source link

Crash if no subject #13

Closed thuer-it closed 3 years ago

thuer-it commented 3 years ago

Hi,

Sometimes it happens, that mail came without subject, than the script crash

2021-01-28 22:21:34,418 - INFO - Downloaded and parsed mail 'None' with 1 attachments
2021-01-28 22:21:34,419 - INFO - Mark UID 5 with \Seen FLAG
Traceback (most recent call last):
  File "/home/andreas/.local/bin/attachment-downloader", line 71, in <module>
    logging.info("Processing message '%s' subject '%s'", uid, message.subject)
AttributeError: 'Struct' object has no attribute 'subject'

Br Andreas

jamesridgway commented 3 years ago

There is a fix here for this: https://github.com/jamesridgway/attachment-downloader/commit/854906b1682590577c5852176581e87d509762a9

I plan to release a new version once I have all outstanding issues addressed

thuer-it commented 3 years ago

Thank you very much!

jamesridgway commented 3 years ago

Fixed in 1.1.3