changeset 7707:0e5926e84b3b

vcs: drop exceptionhandling in utils.imports.import_class - it is over-engineered and just make debugging harder
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 26 May 2019 23:25:04 +0200
parents 7268209e8843
children ab30729c735c
files kallithea/lib/vcs/utils/imports.py
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/vcs/utils/imports.py	Mon Jan 07 00:00:22 2019 +0100
+++ b/kallithea/lib/vcs/utils/imports.py	Sun May 26 23:25:04 2019 +0200
@@ -16,12 +16,6 @@
     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