Unverified Commit 625a72d5 authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Fix IT (#2827)

parent 4f70fb30
...@@ -308,9 +308,11 @@ def _try_installation_path_sequentially(*sitepackages): ...@@ -308,9 +308,11 @@ 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 (path / 'nni' / 'main.js').is_file(): if len(path.parents) > 2 and (path.parents[2] / 'nni' / 'main.js').is_file():
return str(path) return str(path.parents[2])
if (path / 'nni' / 'main.js').is_file():
return str(path)
return None return None
def get_nni_installation_path(): def get_nni_installation_path():
......
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