"vscode:/vscode.git/clone" did not exist on "eb5463e6d1ba0d784cb428e7dc5f1056962cc4cf"
Unverified Commit 625a72d5 authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Fix IT (#2827)

parent 4f70fb30
...@@ -308,7 +308,9 @@ def _try_installation_path_sequentially(*sitepackages): ...@@ -308,7 +308,9 @@ def _try_installation_path_sequentially(*sitepackages):
Return None if nothing is found Return None if nothing is found
''' '''
for sitepackage in sitepackages: for sitepackage in sitepackages:
for path in [Path(sitepackage).parents[2], Path(sitepackage)]: path = Path(sitepackage)
if len(path.parents) > 2 and (path.parents[2] / 'nni' / 'main.js').is_file():
return str(path.parents[2])
if (path / 'nni' / 'main.js').is_file(): if (path / 'nni' / 'main.js').is_file():
return str(path) return str(path)
return None return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment