We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68165f1 commit 42e09daCopy full SHA for 42e09da
pyres/__init__.py
@@ -21,10 +21,10 @@ def safe_str_to_class(s):
21
klass = lst[-1]
22
mod_list = lst[:-1]
23
module = ".".join(mod_list)
24
- mod = my_import(module)
25
- if hasattr(mod, klass):
26
- return getattr(mod, klass)
27
- else:
+ mod = my_import(module)
+ if hasattr(mod, klass):
+ return getattr(mod, klass)
+ else:
28
raise ImportError('')
29
30
def str_to_class(s):
0 commit comments