提交 2b4494a6 编写于 作者: S sjtubinlong

fix bug: fail to init in offline enviroment

上级 73ce4a9f
......@@ -221,11 +221,14 @@ class HubServer(object):
raise
else:
pass
file_url = self.config[
'resource_storage_server_url'] + RESOURCE_LIST_FILE
result, tips, self.resource_list_file = default_downloader.download_file(
file_url, save_path=hub.CACHE_HOME, replace=True)
if not result:
try:
file_url = self.config[
'resource_storage_server_url'] + RESOURCE_LIST_FILE
result, tips, self.resource_list_file = default_downloader.download_file(
file_url, save_path=hub.CACHE_HOME, replace=True)
if not result:
return False
except:
return False
return True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册