提交 e049f6d6 编写于 作者: S Steffy-zxf 提交者: wuzewu

Inform user the installed version of the module (#9)

* Inform user the installed version of the module
上级 b8240fb8
......@@ -130,7 +130,8 @@ class HubServer(object):
if self.resource_list_file['version'][index] == version:
return {
'url': self.resource_list_file['url'][index],
'md5': self.resource_list_file['md5'][index]
'md5': self.resource_list_file['md5'][index],
'version': version
}
return {}
......
......@@ -68,6 +68,7 @@ class LocalModuleManager(object):
module_name, version=module_version)
url = search_result.get('url', None)
md5_value = search_result.get('md5', None)
installed_module_version = search_result.get('version', None)
#TODO(wuzewu): add compatibility check
if not url:
tips = "Can't find module %s" % module_name
......@@ -89,8 +90,8 @@ class LocalModuleManager(object):
if module_dir:
tips = "Successfully installed %s" % module_name
if module_version:
tips += "-%s" % module_version
if installed_module_version:
tips += "-%s" % installed_module_version
return True, tips, module_dir
tips = "Download %s-%s failed" % (module_name, module_version)
return False, tips, module_dir
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册