Skip to content

Commit

Permalink
Tweak import
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Aug 12, 2024
1 parent e2b4c6d commit d646ad2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/pathlib/_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
resemble pathlib's PurePath and Path respectively.
"""

import errno
import functools
import operator
import posixpath
from errno import EINVAL
from glob import _GlobberBase, _no_recurse_symlinks
from stat import S_ISDIR, S_ISLNK, S_ISREG, S_ISSOCK, S_ISBLK, S_ISCHR, S_ISFIFO
from pathlib._os import copyfileobj
Expand Down Expand Up @@ -574,7 +574,7 @@ def _ensure_different_file(self, other_path):
return
except (OSError, ValueError):
return
err = OSError(errno.EINVAL, "Source and target are the same file")
err = OSError(EINVAL, "Source and target are the same file")
err.filename = str(self)
err.filename2 = str(other_path)
raise err
Expand All @@ -584,9 +584,9 @@ def _ensure_distinct_path(self, other_path):
Raise OSError(EINVAL) if the other path is within this path.
"""
if self == other_path:
err = OSError(errno.EINVAL, "Source and target are the same path")
err = OSError(EINVAL, "Source and target are the same path")
elif self in other_path.parents:
err = OSError(errno.EINVAL, "Source path is a parent of target path")
err = OSError(EINVAL, "Source path is a parent of target path")
else:
return
err.filename = str(self)
Expand Down

0 comments on commit d646ad2

Please sign in to comment.