提交 a3dcc0cb 编写于 作者: W wuzewu

Fix server bug

上级 2215f46a
...@@ -113,7 +113,7 @@ def _load_old_config(config: HubConfig): ...@@ -113,7 +113,7 @@ def _load_old_config(config: HubConfig):
with open(old_cfg_file) as file: with open(old_cfg_file) as file:
try: try:
cfg = json.loads(file.read()) cfg = json.loads(file.read())
config.server = cfg['server_url'] config.server = cfg['server_url'][0]
config.log_level = cfg['log_level'] config.log_level = cfg['log_level']
except: except:
... ...
......
...@@ -109,7 +109,7 @@ class HubServer(object): ...@@ -109,7 +109,7 @@ class HubServer(object):
'''Get the version compatibility information of the model.''' '''Get the version compatibility information of the model.'''
sources = self.sources.values() if not source else [self._generate_source(source)] sources = self.sources.values() if not source else [self._generate_source(source)]
for source in sources: for source in sources:
result = source.get_module_info(name=name) result = source.get_module_compat_info(name=name)
if result: if result:
return result return result
return {} return {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册