Skip to content

Commit c27bcc3

Browse files
bpo-26468: Doc: improve the documentation of shutil.copy2 when it can fail. (GH-13765)
(cherry picked from commit 9585f46) Co-authored-by: Windson yang <wiwindson@outlook.com>
1 parent 6638c92 commit c27bcc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/shutil.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ Directory and files operations
187187
However, this functionality is not available on all platforms.
188188
On platforms where some or all of this functionality is
189189
unavailable, :func:`copy2` will preserve all the metadata
190-
it can; :func:`copy2` never returns failure.
190+
it can; :func:`copy2` never raises an exception because it
191+
cannot preserve file metadata.
191192

192193
:func:`copy2` uses :func:`copystat` to copy the file metadata.
193194
Please see :func:`copystat` for more information

0 commit comments

Comments
 (0)