don't use krbV under python3

This commit is contained in:
Tomas Kopecek 2017-05-03 14:15:46 +02:00
parent ce9b538e43
commit 6d5dc301d3

View file

@ -24,7 +24,10 @@ import socket
import string
import random
import base64
import krbV
try:
import krbV
except ImportError:
krbV = None
import koji
import cgi #for parse_qs
from .context import context
@ -301,6 +304,10 @@ class Session(object):
if self.logged_in:
raise koji.AuthError("Already logged in")
if krbV is None:
# python3 is not supported
raise koji.AuthError("krbV module not installed")
if not (context.opts.get('AuthPrincipal') and context.opts.get('AuthKeytab')):
raise koji.AuthError('not configured for Kerberos authentication')