def load_provider_classes(): """ iterates through the modules in this package and import every single one of them. This will trigger the registration of the providers in the global provider_registry (s.o.), which registers all available provider classes :sideeffect: the classes in the submodules are registrated in the provider registry """ try: import_submodules(__name__) import_submodules("%s.%s" % (__name__, "pushprovider")) import_submodules("%s.%s" % (__name__, "emailprovider")) except ImportError as exx: log.error('unable to load provider module : %s (%r)', __name__, exx) raise Exception(exx) # the sms providers are optional, so we just log the error in case of an # import error try: import smsprovider import_submodules('smsprovider') except ImportError as exx: log.error('unable to load provider module : smsprovider (%r)', exx)
def load_provider_classes(): """ iterates through the modules in this package and import every single one of them. This will trigger the registration of the providers in the global provider_registry (s.o.), which registers all available provider classes :sideeffect: the classes in the submodules are registrated in the provider registry """ try: import_submodules(__name__) import_submodules("%s.%s" % (__name__, "pushprovider")) import_submodules("%s.%s" % (__name__, "emailprovider")) import_submodules("%s.%s" % (__name__, "smsprovider")) import_submodules("%s.%s" % (__name__, "voiceprovider")) except ImportError as exx: log.error('unable to load provider module : %s (%r)', __name__, exx) raise Exception(exx)