diff --git a/confluent_osdeploy/el8/profiles/default/scripts/add_local_repositories b/confluent_osdeploy/el8/profiles/default/scripts/add_local_repositories index 2e128b47..e9cc5e9a 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/add_local_repositories +++ b/confluent_osdeploy/el8/profiles/default/scripts/add_local_repositories @@ -3,9 +3,13 @@ try: except ImportError: import ConfigParser as configparser import cStringIO -import imp +import importlib.util +import importlib.machinery import sys -apiclient = imp.load_source('apiclient', '/opt/confluent/bin/apiclient') +modloader = importlib.machinery.SourceFileLoader('apiclient', '/opt/confluent/bin/apiclient') +modspec = importlib.util.spec_from_file_location('apiclient', '/opt/confluent/bin/apiclient', loader=modloader) +apiclient = importlib.util.module_from_spec(modspec) +modspec.loader.exec_module(apiclient) repo = None server = None profile = None diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/add_local_repositories b/confluent_osdeploy/el9-diskless/profiles/default/scripts/add_local_repositories index 2e128b47..e9cc5e9a 100644 --- a/confluent_osdeploy/el9-diskless/profiles/default/scripts/add_local_repositories +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/add_local_repositories @@ -3,9 +3,13 @@ try: except ImportError: import ConfigParser as configparser import cStringIO -import imp +import importlib.util +import importlib.machinery import sys -apiclient = imp.load_source('apiclient', '/opt/confluent/bin/apiclient') +modloader = importlib.machinery.SourceFileLoader('apiclient', '/opt/confluent/bin/apiclient') +modspec = importlib.util.spec_from_file_location('apiclient', '/opt/confluent/bin/apiclient', loader=modloader) +apiclient = importlib.util.module_from_spec(modspec) +modspec.loader.exec_module(apiclient) repo = None server = None profile = None