Skip to content

Commit

Permalink
Fixes for Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortal committed May 17, 2017
1 parent ac4a113 commit f04a260
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions emailtunnel/mailhole.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def should_mailhole(self, message, recipient, sender):
def deliver_mailhole(self, message, recipients, sender, mailhole_key):
with requests.Session() as session:
message_bytes = re.sub(br'(\r\n|\n|\r)', b'\r\n',
message.as_bytes())
message.as_binary())
for rcpt in recipients:
data = dict(
key=mailhole_key,
Expand Down Expand Up @@ -62,7 +62,7 @@ def deliver(self, message, recipients, sender):
if not requests:
print("You must `pip install requests`!")
if ordinary_rcpts:
super().deliver(message, ordinary_rcpts, sender)
super(MailholeRelayMixin, self).deliver(message, ordinary_rcpts, sender)


assert re.match(MailholeRelayMixin.mailhole_pattern, '[email protected]')
Expand Down

0 comments on commit f04a260

Please sign in to comment.