Skip to content

Commit e5e15da

Browse files
committed
Some preconditions for the _install_fname function
1 parent 7c1abef commit e5e15da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

install.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def _symlink(src_path: str, dst_path: str) -> None:
6565

6666

6767
def _install_fname(fname: str, src_dir: str, dst_dir: str) -> None:
68+
"""
69+
pre:: os.path.exists(os.path.join(src_dir, path))
70+
pre:: os.path.exists(dst_dir)
71+
"""
6872
src_path = os.path.join(src_dir, fname)
6973
dst_path = os.path.join(dst_dir, fname)
7074
_symlink(src_path, dst_path)

0 commit comments

Comments
 (0)