Skip to content

Commit

Permalink
Fix Python 3isms in tkmail.server
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortal committed May 1, 2015
1 parent 5e0b349 commit e1a040d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tkmail/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ def store_failed_envelope(self, envelope, description, summary):

try:
os.mkdir('error')
except FileExistsError:
except OSError:
pass

with open('error/%s.mail' % now, 'wb') as fp:
fp.write(envelope.message.as_bytes())
fp.write(envelope.message.as_binary())

with open('error/%s.json' % now, 'w') as fp:
metadata = {
Expand Down

0 comments on commit e1a040d

Please sign in to comment.