Skip to content

Commit

Permalink
smtpd.SMTPServer is an old-style class in Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortal committed May 1, 2015
1 parent e7ba25d commit 6321da2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion emailtunnel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ class SMTPReceiver(smtpd.SMTPServer):
def __init__(self, host, port):
self.host = host
self.port = port
super(SMTPReceiver, self).__init__((self.host, self.port), None)
if six.PY3:
super(SMTPReceiver, self).__init__((self.host, self.port), None)
else:
smtpd.SMTPServer.__init__(self, (self.host, self.port), None)
self.startup_log()

def startup_log(self):
Expand Down

0 comments on commit 6321da2

Please sign in to comment.