From: W. Trevor King Date: Tue, 26 Aug 2014 04:27:26 +0000 (-0700) Subject: error: Swap SMTPConnectionError superclasses X-Git-Tag: v3.9~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b0810f3d56207294eba96977781c1a342345fea;p=rss2email.git error: Swap SMTPConnectionError superclasses To avoid: >>> import rss2email.error >>> rss2email.error.SMTPAuthenticationError(server='host', username='bob')) Traceback (most recent call last): File "", line 1, in File "./rss2email/error.py", line 85, in __init__ server=server, message=message) File "./rss2email/error.py", line 67, in __init__ super(SMTPConnectionError, self).__init__(message=message) TypeError: SMTPAuthenticationError does not take keyword arguments Reported-by: Federico Churca-Torrusio Signed-off-by: W. Trevor King --- diff --git a/CHANGELOG b/CHANGELOG index a893285..228aa97 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ v3.9 (unreleased) + * Fix an error with SMTPConnectionError inhertence order ("does not take keyword arguments"). * Add a new `smtp-ssl-protocol` setting, to select acceptable protocols for SMTP connections. * Fix non-compliant User-Agent header for HTTP/1.1. * Fix an error in the NoToEmailAddress invocation. diff --git a/rss2email/error.py b/rss2email/error.py index f9adf65..49a1c93 100644 --- a/rss2email/error.py +++ b/rss2email/error.py @@ -60,7 +60,7 @@ class NoValidEncodingError (RSS2EmailError, ValueError): self.encodings = encodings -class SMTPConnectionError (ValueError, RSS2EmailError): +class SMTPConnectionError (RSS2EmailError, ValueError): def __init__(self, server, message=None): if message is None: message = 'could not connect to mail server {}'.format(server)