def get_interface(name): try: name = get_canonical_name(name) import_path = settings.SENTRY_INTERFACES[name] except KeyError: raise ValueError('Invalid interface name: %s' % (name, )) try: interface = import_string(import_path) except Exception: raise ValueError('Unable to load interface: %s' % (name, )) return interface
def get_interface(name): try: name = get_canonical_name(name) import_path = settings.SENTRY_INTERFACES[name] except KeyError: raise ValueError('Invalid interface name: %s' % (name, )) try: interface = import_string(import_path) except Exception: raise ValueError('Unable to load interface: %s' % (name, )) return interface