Skip to content

Commit 2e3c075

Browse files
committed
Add helper to raise other than EXDEV
1 parent eb30e3d commit 2e3c075

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎Lib/shutil.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,10 @@ def _is_immutable(src):
980980
immutable_states = [stat.UF_IMMUTABLE, stat.SF_IMMUTABLE]
981981
return hasattr(st, 'st_flags') and st.st_flags in immutable_states
982982

983+
def _raise_not_EXDEV(err):
984+
if err.errno != errno.EXDEV:
985+
raise err from None
986+
983987
def _get_gid(name):
984988
"""Returns a gid, given a group name."""
985989
if name is None:

0 commit comments

Comments
 (0)