mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Make sure paths are paths
This commit is contained in:
parent
de0e6385b4
commit
0dd7710556
|
@ -25,7 +25,7 @@ def link_package(origin, link_name, force=False):
|
||||||
|
|
||||||
|
|
||||||
def symlink(model_path, link_name, force):
|
def symlink(model_path, link_name, force):
|
||||||
if not model_path.exists():
|
if not Path(model_path).exists():
|
||||||
util.sys_exit(
|
util.sys_exit(
|
||||||
"The data should be located in {p}".format(p=model_path),
|
"The data should be located in {p}".format(p=model_path),
|
||||||
title="Can't locate model data")
|
title="Can't locate model data")
|
||||||
|
@ -33,7 +33,7 @@ def symlink(model_path, link_name, force):
|
||||||
data_path = str(util.get_data_path())
|
data_path = str(util.get_data_path())
|
||||||
link_path = Path(__file__).parent.parent / data_path / link_name
|
link_path = Path(__file__).parent.parent / data_path / link_name
|
||||||
|
|
||||||
if link_path.exists():
|
if Path(link_path).exists():
|
||||||
if force:
|
if force:
|
||||||
os.unlink(str(link_path))
|
os.unlink(str(link_path))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user