diff options
Diffstat (limited to 'Lib/nntplib.py')
| -rw-r--r-- | Lib/nntplib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py index 2de6ebd1b5..7f26e1ca6e 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -71,7 +71,7 @@ import warnings try: import ssl -except ImportError: +except ModuleNotFoundError: _have_ssl = False else: _have_ssl = True @@ -359,7 +359,7 @@ class _NNTPBase: if is_connected(): try: self.quit() - except (socket.error, EOFError): + except (OSError, EOFError): pass finally: if is_connected(): @@ -947,7 +947,7 @@ class _NNTPBase: if auth: user = auth[0] password = auth[2] - except IOError: + except OSError: pass # Perform NNTP authentication if needed. if not user: |
