Require requests_kerberos only when needed

If CTS integration is not used, let's not import a module that is not
needed.

JIRA: RHELCMP-6611
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2021-09-10 09:59:10 +02:00
parent 195bfbefa4
commit 5c26aa9127
1 changed files with 2 additions and 2 deletions

View File

@ -129,11 +129,11 @@ def get_compose_info(
def get_authentication(conf):
from requests_kerberos import HTTPKerberosAuth
authentication = None
cts_keytab = conf.get("cts_keytab", None)
if cts_keytab:
from requests_kerberos import HTTPKerberosAuth
authentication = HTTPKerberosAuth()
return authentication