# HG changeset patch # User Mads Kiilerich # Date 2019-05-26 23:25:04 # Node ID 0e5926e84b3b7ea97eeb36a1cb1c01f9793902c3 # Parent 7268209e884374f9d8db85247e5055b5dbb3cb87 vcs: drop exceptionhandling in utils.imports.import_class - it is over-engineered and just make debugging harder diff --git a/kallithea/lib/vcs/utils/imports.py b/kallithea/lib/vcs/utils/imports.py --- a/kallithea/lib/vcs/utils/imports.py +++ b/kallithea/lib/vcs/utils/imports.py @@ -16,12 +16,6 @@ def import_class(class_path): splitted = class_path.split('.') mod_path = '.'.join(splitted[:-1]) class_name = splitted[-1] - try: - class_mod = __import__(mod_path, {}, {}, [class_name]) - except ImportError as err: - msg = "There was problem while trying to import backend class. " \ - "Original error was:\n%s" % err - raise VCSError(msg) + class_mod = __import__(mod_path, {}, {}, [class_name]) cls = getattr(class_mod, class_name) - return cls