don't use krbV under python3
This commit is contained in:
parent
ce9b538e43
commit
6d5dc301d3
1 changed files with 8 additions and 1 deletions
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue