From 0b0810f3d56207294eba96977781c1a342345fea Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 25 Aug 2014 21:27:26 -0700 Subject: [PATCH] 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 --- CHANGELOG | 1 + rss2email/error.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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) -- 2.26.2