Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c5598b

Browse files
committed
whatsnew: shutil copyfile SameFileError (#1492704)
1 parent 8df4ec7 commit 0c5598b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Doc/whatsnew/3.4.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,16 @@ and will be automatically closed at the end of the :keyword:`with` block.
12971297
(Contributed by Filip Gruszczyński in :issue:`13896`.)
12981298

12991299

1300+
shutil
1301+
------
1302+
1303+
:func:`~shutil.copyfile` now raises a specific :exc:`~shutil.Error` subclass,
1304+
:exc:`~shutil.SameFileError`, when the source and destination are the same
1305+
file, which allows an application to take appropriate action on this specific
1306+
error. (Contributed by Atsuo Ishimoto and Hynek Schlawack in
1307+
:issue:`1492704`.)
1308+
1309+
13001310
smtpd
13011311
-----
13021312

0 commit comments

Comments
 (0)