diff --git a/kafka/conn.py b/kafka/conn.py index cac354875..1efb8a0a1 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -78,7 +78,7 @@ class SSLWantWriteError(Exception): try: import gssapi from gssapi.raw.misc import GSSError -except ImportError: +except (ImportError, OSError): #no gssapi available, will disable gssapi mechanism gssapi = None GSSError = None