marrow / mailer

A light-weight, modular, message representation and mail delivery framework for Python.
MIT License
276 stars 62 forks source link

Added hasattr to handle AttributeError: 'Message' object has no attribute 'sendmail_f' #77

Closed perkrlsn closed 5 years ago

perkrlsn commented 7 years ago

Failing check on 3.5

Not sure why it's picking up basestring here, version_info is obviously > 3.5

Code inte test_message.py looks fine to me.

if sys.version_info < (3, 0):
    assert isinstance(filename, basestring)  # Successfully converts tuple to a string
else:
    assert isinstance(filename, str)
pedro-walter commented 6 years ago

This PR solved my problem, sad that this repository seems to not be maintained anymore :(

amcgregor commented 5 years ago

Obsoleted by 3c5401d5f21fa459f216bd84f80be10fd6a920b1. Edited to add: a note that at the time of your comment, @pedro-walter, I was four months into rehab, recovering from what essentially boils down to a stroke incurred October prior. (Cerebral haemorrhage / aneurism due to burst AVM—glad this uppity thing isn't in there any more!) So, apologies, had other priorities at the time. ;^) Back 'round for Python 2 EOL, though, modernizing as I go.