3141e04822a8c40e0d64e51a040305ade3f66d8c,spacy/cli/link.py,,link,#Any#Any#Any#Any#,16
Before Change
link_path.unlink()
elif link_path.exists(): // does it exist otherwise?
// NB: Check this last because valid symlinks also "exist".
prints("This can happen if your data directory contains a directory "
"or file of the same name.", link_path,
title="Can"t overwrite symlink %s" % link_name, exits=1)
try:
symlink_to(link_path, model_path)
except:
// This is quite dirty, but just making sure other errors are caught.
After Change
else:
model_path = Path(origin) if model_path is None else Path(model_path)
if not model_path.exists():
prints(Messages.M009.format(path=path2str(model_path)),
title=Messages.M008, exits=1)
data_path = util.get_data_path()
if not data_path or not data_path.exists():
spacy_loc = Path(__file__).parent.parent
prints(Messages.M011, spacy_loc, title=Messages.M010, exits=1)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances Project Name: explosion/spaCy
Commit Name: 3141e04822a8c40e0d64e51a040305ade3f66d8c
Time: 2018-04-03
Author: ines.montani@gmail.com
File Name: spacy/cli/link.py
Class Name:
Method Name: link
Project Name: explosion/spaCy
Commit Name: 3141e04822a8c40e0d64e51a040305ade3f66d8c
Time: 2018-04-03
Author: ines.montani@gmail.com
File Name: spacy/cli/package.py
Class Name:
Method Name: validate_meta
Project Name: explosion/spaCy
Commit Name: 3141e04822a8c40e0d64e51a040305ade3f66d8c
Time: 2018-04-03
Author: ines.montani@gmail.com
File Name: spacy/cli/convert.py
Class Name:
Method Name: convert
Project Name: explosion/spaCy
Commit Name: 3141e04822a8c40e0d64e51a040305ade3f66d8c
Time: 2018-04-03
Author: ines.montani@gmail.com
File Name: spacy/cli/download.py
Class Name:
Method Name: get_compatibility
Project Name: explosion/spaCy
Commit Name: 3141e04822a8c40e0d64e51a040305ade3f66d8c
Time: 2018-04-03
Author: ines.montani@gmail.com
File Name: spacy/cli/link.py
Class Name:
Method Name: link