mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-29 20:06:25 -06:00
Do not fail silently when ldap_config yields an ImportError itself
This commit is contained in:
parent
cd236aa886
commit
7494e2999b
@ -382,8 +382,11 @@ CSRF_TRUSTED_ORIGINS = ALLOWED_HOSTS
|
||||
|
||||
try:
|
||||
from netbox import ldap_config as LDAP_CONFIG
|
||||
except ImportError:
|
||||
LDAP_CONFIG = None
|
||||
except ImportError as ie:
|
||||
if ie.name == 'netbox':
|
||||
LDAP_CONFIG = None
|
||||
else:
|
||||
raise ie
|
||||
|
||||
if LDAP_CONFIG is not None:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user