rss2email: fix e.__cause__ -> self.__cause__ typos in exception logging.
authorW. Trevor King <wking@tremily.us>
Thu, 18 Oct 2012 17:38:19 +0000 (13:38 -0400)
committerW. Trevor King <wking@tremily.us>
Thu, 18 Oct 2012 17:38:19 +0000 (13:38 -0400)
rss2email.py

index 4fa7edbf98db5943647b6c3591a42bf5e8336fe0..fc87a838a770190e7a55ebf943fb6d35dc9ef7c2 100755 (executable)
@@ -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):