2018-02-22 14:49:38 +01:00
|
|
|
import importlib.util
|
|
|
|
import sys
|
|
|
|
|
|
|
|
try:
|
2018-04-03 09:02:19 +02:00
|
|
|
spec = importlib.util.spec_from_file_location('ldap_config', '/etc/netbox/config/ldap_config.py')
|
2018-02-22 14:49:38 +01:00
|
|
|
module = importlib.util.module_from_spec(spec)
|
|
|
|
spec.loader.exec_module(module)
|
|
|
|
sys.modules['netbox.ldap_config'] = module
|
|
|
|
except:
|
|
|
|
raise ImportError('')
|