Skip to content

Commit 2559484

Browse files
authored
Merge pull request #268 from cs50/shutil-copy-patch
raise FileNotFoundError in addition to IsADirectoryError in _copy
2 parents 66ce910 + 9efd934 commit 2559484

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: check50/_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ def _copy(src, dst):
515515
"""Copy src to dst, copying recursively if src is a directory."""
516516
try:
517517
shutil.copy(src, dst)
518-
except IsADirectoryError:
518+
except (FileNotFoundError, IsADirectoryError):
519519
if os.path.isdir(dst):
520520
dst = os.path.join(dst, os.path.basename(src))
521521
shutil.copytree(src, dst)

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
"console_scripts": ["check50=check50.__main__:main"]
3030
},
3131
url="https://github.com/cs50/check50",
32-
version="3.3.3",
32+
version="3.3.4",
3333
include_package_data=True
3434
)

0 commit comments

Comments
 (0)