expephalon-playsms/core/modules/otp.py

13 lines
336 B
Python
Raw Normal View History

import importlib
from django.conf import settings
providers = {}
for module in settings.EXPEPHALON_MODULES:
try:
moo = importlib.import_module(f"{module}.otp")
for name, provider in moo.OTPPROVIDERS.items():
providers[name] = provider
except (AttributeError, ModuleNotFoundError):
continue