Error out if krbV is unavailable and gssapi did not work

In python3, krbV is unavailable, which means that we should not stay
silent if gssapi login failed.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2017-07-21 11:12:38 +02:00 committed by Mike McLean
parent 4a05467c63
commit 56b023b158

View file

@ -2101,7 +2101,10 @@ class ClientSession(object):
if self.gssapi_login(proxyuser=proxyuser):
return True
except:
pass
if krbV:
pass
else:
raise
if not krbV:
raise PythonImportError(
@ -2195,6 +2198,7 @@ class ClientSession(object):
self.new_session()
# 60 second timeout during login
sinfo = None
old_opts = self.opts
self.opts = old_opts.copy()
self.opts['timeout'] = 60