Skip to content

Commit 8c37277

Browse files
authored
Update conn.py to catch OSError in case of failed import
Closes #2399.
1 parent 0dbf746 commit 8c37277

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/conn.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class SSLWantWriteError(Exception):
7878
try:
7979
import gssapi
8080
from gssapi.raw.misc import GSSError
81-
except ImportError:
81+
except (ImportError, OSError):
8282
#no gssapi available, will disable gssapi mechanism
8383
gssapi = None
8484
GSSError = None

0 commit comments

Comments
 (0)