Skip to content

Commit

Permalink
Merge #43, fixes #42
Browse files Browse the repository at this point in the history
  • Loading branch information
themartorana committed Jan 6, 2015
2 parents 0fb830e + e340ee9 commit 7ee8f65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postmark/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def send(self, test=None):
try:
#print 'sending request to postmark: %s' % json_message
result = urlopen(req)
jsontxt = result.read()
jsontxt = result.read().decode()
result.close()
if result.code == 200:
self.message_id = json.loads(jsontxt).get('MessageID', None)
Expand All @@ -468,7 +468,7 @@ def send(self, test=None):
raise PMMailUnauthorizedException('Sending Unauthorized - incorrect API key.', err)
elif err.code == 422:
try:
jsontxt = err.read()
jsontxt = err.read().decode()
jsonobj = json.loads(jsontxt)
desc = jsonobj['Message']
except:
Expand Down

0 comments on commit 7ee8f65

Please sign in to comment.