Skip to content

Commit

Permalink
Merge pull request #268 from cs50/shutil-copy-patch
Browse files Browse the repository at this point in the history
raise FileNotFoundError in addition to IsADirectoryError in _copy
  • Loading branch information
rongxin-liu authored Oct 4, 2021
2 parents 66ce910 + 9efd934 commit 2559484
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion check50/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def _copy(src, dst):
"""Copy src to dst, copying recursively if src is a directory."""
try:
shutil.copy(src, dst)
except IsADirectoryError:
except (FileNotFoundError, IsADirectoryError):
if os.path.isdir(dst):
dst = os.path.join(dst, os.path.basename(src))
shutil.copytree(src, dst)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"console_scripts": ["check50=check50.__main__:main"]
},
url="https://github.com/cs50/check50",
version="3.3.3",
version="3.3.4",
include_package_data=True
)

0 comments on commit 2559484

Please sign in to comment.