-
Notifications
You must be signed in to change notification settings - Fork 729
Closed
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap
Description
Issue Summary
The __str__ method of the Mail class, doesn't actually return anything, hence trying something like logging.debug("Mail: %s\n", some_mail), where some_mail is an instance of the Mail class, will result in an exception.
Steps to Reproduce
- Instantiate the
Mailclass - Print the instance
This will result in a TypeError exception:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-8-119834a39903> in <module>()
----> 1 print(message)
TypeError: __str__ returned non-string (type NoneType)
One possible fix would be to replace
def __str__(self):
self.get()with
def __str__(self):
return str(self.get())Technical details:
- sendgrid-python Version: master (latest commit: [bdba194])
- Python Version: 2.7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap