[New-bugs-announce] [issue36939] Allow to use shutil.copytree for existing destination directory with optional argument

jack1142 report at bugs.python.org
Thu May 16 10:19:44 EDT 2019


New submission from jack1142 <kuba.kuczys at gmail.com>:

Currently shutil.copytree will allow to copy tree only if destination directory doesn't exist. I think there could be added `exist_ok` keyword argument (defaulting to `False`), which when set to `True` would prevent function from raising `FileExistsError`.
This is pretty easy to implement as `os.makedirs` command that raises this error already has `exist_ok` kwarg, which prevent function from raising that exception already.

----------
components: Library (Lib)
messages: 342645
nosy: jack1142
priority: normal
severity: normal
status: open
title: Allow to use shutil.copytree for existing destination directory with optional argument
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36939>
_______________________________________


More information about the New-bugs-announce mailing list