Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
allow existing directory in shutil.copytree
This is a legacy thing that wasn't updated with https://docs.python.org/3/library/os.html#os.makedirs
  • Loading branch information
ofek authored Aug 1, 2017
commit 5362ebae4390aebddc4e9249d4917eb1939af16d
2 changes: 1 addition & 1 deletion Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2,
else:
ignored_names = set()

os.makedirs(dst)
os.makedirs(dst, exist_ok=True)
errors = []
for name in names:
if name in ignored_names:
Expand Down