This was necessary to make load_url_sub_nodes work with
new kimchi plugin structure.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
Signed-off-by: Gustavo Y. Ribeiro <gyr(a)linux.vnet.ibm.com>
---
src/wok/utils.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/wok/utils.py b/src/wok/utils.py
index af0d200..fa379d4 100644
--- a/src/wok/utils.py
+++ b/src/wok/utils.py
@@ -114,14 +114,14 @@ def get_all_tabs():
def import_class(class_path):
module_name, class_name = class_path.rsplit('.', 1)
try:
- mod = import_module(module_name)
+ mod = import_module(module_name, class_name)
return getattr(mod, class_name)
except (ImportError, AttributeError):
raise ImportError('Class %s can not be imported' % class_path)
-def import_module(module_name):
- return __import__(module_name, globals(), locals(), [''])
+def import_module(module_name, class_name=''):
+ return __import__(module_name, globals(), locals(), [class_name])
def check_url_path(path):
--
1.7.1