Skip to content

Commit

Permalink
raise FileNotFoundError in addition to IsADirectoryError in _copy
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxin-liu committed Oct 4, 2021
1 parent 66ce910 commit 9efd934
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 9efd934

Please sign in to comment.