summaryrefslogtreecommitdiff
path: root/setuptools/_distutils/dir_util.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-08-02 21:03:33 -0400
committerJason R. Coombs <jaraco@jaraco.com>2022-08-02 21:13:43 -0400
commite90b97304d50eb1246197014ca2d794987ce1934 (patch)
tree23e9f77cedeeb30cd3765fd1e35862c2eb89cffb /setuptools/_distutils/dir_util.py
parent9b0cf7e1dfd8c3e11a47a9b3c7f4385745d50daf (diff)
parentc397f4c164e0a6f49a1ac3a70f5c80fe05785ed6 (diff)
downloadpython-setuptools-git-e90b97304d50eb1246197014ca2d794987ce1934.tar.gz
Merge https://github.com/pypa/distutils into bugfix/distutils-164
Diffstat (limited to 'setuptools/_distutils/dir_util.py')
-rw-r--r--setuptools/_distutils/dir_util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/_distutils/dir_util.py b/setuptools/_distutils/dir_util.py
index 7a132e31..6f0bb8ad 100644
--- a/setuptools/_distutils/dir_util.py
+++ b/setuptools/_distutils/dir_util.py
@@ -34,7 +34,7 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0): # noqa: C901
# Detect a common bug -- name is None
if not isinstance(name, str):
raise DistutilsInternalError(
- "mkpath: 'name' must be a string (got %r)" % (name,)
+ "mkpath: 'name' must be a string (got {!r})".format(name)
)
# XXX what's the better way to handle verbosity? print as we create
@@ -76,7 +76,7 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0): # noqa: C901
except OSError as exc:
if not (exc.errno == errno.EEXIST and os.path.isdir(head)):
raise DistutilsFileError(
- "could not create '%s': %s" % (head, exc.args[-1])
+ "could not create '{}': {}".format(head, exc.args[-1])
)
created_dirs.append(head)
@@ -144,7 +144,7 @@ def copy_tree( # noqa: C901
names = []
else:
raise DistutilsFileError(
- "error listing files in '%s': %s" % (src, e.strerror)
+ "error listing files in '{}': {}".format(src, e.strerror)
)
if not dry_run: