Skip to content

Commit

Permalink
simple fix for an anoying problem by passing an unicode as the host p…
Browse files Browse the repository at this point in the history
…arameter
  • Loading branch information
Richard G Kuesters committed May 14, 2014
1 parent b806b62 commit 8696afe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cyclone/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ def sendmail(mailconf, message):
raise TypeError("message must be an instance of cyclone.mail.Message")

host = mailconf.get("host")

if isinstance(host, unicode):
host = str(unicode)

if not isinstance(host, types.StringType):
raise ValueError("mailconf requires a 'host' configuration")

Expand Down

0 comments on commit 8696afe

Please sign in to comment.