Commit f7765191 authored by Manuel Christlieb's avatar Manuel Christlieb

fix: [unused-variable] Unused variable 'err'

parent 2e9343fa
......@@ -4,14 +4,14 @@ from importlib import import_module
def import_string(dotted_path):
try:
module_path, class_name = dotted_path.rsplit('.', 1)
except ValueError as err:
except ValueError:
raise ImportError("%s doesn't look like a module path" % dotted_path)
module = import_module(module_path)
try:
return getattr(module, class_name)
except AttributeError as err:
except AttributeError:
raise ImportError('Module "%s" does not define a "%s" attribute/class' % (
module_path, class_name)
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment