diff options
Diffstat (limited to 'Lib/logging/handlers.py')
-rw-r--r-- | Lib/logging/handlers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 17eca8a..82896ad 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -347,7 +347,7 @@ class SocketHandler(logging.Handler): try: self.sock = self.makeSocket() self.retryTime = None # next time, no delay before trying - except: + except socket.error: #Creation failed, so set the retry time and return. if self.retryTime is None: self.retryPeriod = self.retryStart @@ -738,7 +738,7 @@ class SMTPHandler(logging.Handler): import smtplib try: from email.Utils import formatdate - except: + except ImportError: formatdate = self.date_time port = self.mailport if not port: |