From 43ea6d9acc5227976ab0deeef0243cfaf5b0be71 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 31 Dec 2008 03:37:51 +0000 Subject: [PATCH] #4788 qualify some bare except clauses --- Lib/ssl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/ssl.py b/Lib/ssl.py index 21ae4053750..03a317b7e06 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -103,7 +103,7 @@ class SSLSocket (socket): # see if it's connected try: socket.getpeername(self) - except: + except socket.error: # no, no connection yet self._sslobj = None else: @@ -441,7 +441,7 @@ def sslwrap_simple (sock, keyfile=None, certfile=None): PROTOCOL_SSLv23, None) try: sock.getpeername() - except: + except socket.error: # no, no connection yet pass else: