LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File paramiko-2.3.1-disable-gssapi-on-unsupported-version.patch of Package python-paramiko (Project home:lenovo-lico:lico-dep:5.1:el6)

diff -ru paramiko-2.3.1.orig/paramiko/ssh_gss.py paramiko-2.3.1/paramiko/ssh_gss.py
--- paramiko-2.3.1.orig/paramiko/ssh_gss.py	2017-09-22 21:15:16.000000000 +0100
+++ paramiko-2.3.1/paramiko/ssh_gss.py	2017-10-29 21:16:08.071429184 +0100
@@ -51,7 +51,12 @@
 
 try:
     import gssapi
-    GSS_EXCEPTIONS = (gssapi.GSSException,)
+    try:
+        GSS_EXCEPTIONS = (gssapi.GSSException,)
+    except AttributeError:
+        # Unsupported GSS API
+        GSS_AUTH_AVAILABLE = False
+        _API = None
 except (ImportError, OSError):
     try:
         import pywintypes