From 4e598baa003a6cc013924f38959e630bbc264545 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 18 Oct 2012 13:38:19 -0400 Subject: [PATCH] rss2email: fix e.__cause__ -> self.__cause__ typos in exception logging. --- rss2email.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rss2email.py b/rss2email.py index 4fa7edb..fc87a83 100755 --- a/rss2email.py +++ b/rss2email.py @@ -81,7 +81,7 @@ class RSS2EmailError (Exception): def log(self): LOG.error(str(self)) if self.__cause__ is not None: - LOG.error('cause: {}'.format(e.__cause__)) + LOG.error('cause: {}'.format(self.__cause__)) class TimeoutError (RSS2EmailError): @@ -118,8 +118,8 @@ class SMTPConnectionError (ValueError, RSS2EmailError): LOG.warning( 'check your config file to confirm that smtp-server and other ' 'mail server settings are configured properly') - if hasattr(e.__cause__, 'reason'): - LOG.error('reason: {}'.format(e.__cause__.reason)) + if hasattr(self.__cause__, 'reason'): + LOG.error('reason: {}'.format(self.__cause__.reason)) class SMTPAuthenticationError (SMTPConnectionError): -- 2.26.2