提交 33a0fc45 编写于 作者: W wuzewu

update arguments

上级 4e4297df
...@@ -93,7 +93,7 @@ class ModuleHelper(object): ...@@ -93,7 +93,7 @@ class ModuleHelper(object):
class Module(object): class Module(object):
def __init__(self, def __init__(self,
key=None, name=None,
url=None, url=None,
module_dir=None, module_dir=None,
signatures=None, signatures=None,
...@@ -110,8 +110,8 @@ class Module(object): ...@@ -110,8 +110,8 @@ class Module(object):
self.processor = None self.processor = None
self.name = "temp" self.name = "temp"
# TODO(wuzewu): print more module loading info log # TODO(wuzewu): print more module loading info log
if key: if name:
self._init_with_key(key=key) self._init_with_name(name=name)
elif url: elif url:
self._init_with_url(url=url) self._init_with_url(url=url)
elif module_dir: elif module_dir:
...@@ -131,10 +131,10 @@ class Module(object): ...@@ -131,10 +131,10 @@ class Module(object):
else: else:
raise "Error! HubModule can't init with nothing" raise "Error! HubModule can't init with nothing"
def _init_with_key(self, key): def _init_with_name(self, name):
logger.info("Try installing module %s" % key) logger.info("Try installing module %s" % name)
result, tips, module_dir = default_module_manager.install_module( result, tips, module_dir = default_module_manager.install_module(
module_name=key) module_name=name)
if not result: if not result:
logger.error(tips) logger.error(tips)
exit(1) exit(1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册