Skip to content

Commit 7c1abef

Browse files
committed
Some preconditions for the _symlink function
1 parent ed73452 commit 7c1abef

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
@@ -53,6 +53,10 @@ def _src_is_newer(src_path: str, dst_path: str) -> bool:
5353

5454

5555
def _symlink(src_path: str, dst_path: str) -> None:
56+
"""
57+
pre:: os.path.exists(src_path)
58+
pre:: os.path.exists(os.path.dirname(dst_path))
59+
"""
5660
print("Installing {} as {}".format(src_path, dst_path))
5761
if os.path.exists(dst_path) and not _src_is_newer(src_path, dst_path):
5862
return

0 commit comments

Comments
 (0)