summaryrefslogtreecommitdiff
path: root/setuptools/sandbox.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-05-21 11:31:55 -0400
committerJason R. Coombs <jaraco@jaraco.com>2017-05-21 11:52:32 -0400
commitd48cb39b4666477da1d954d3604023095c233869 (patch)
tree322e5a0cafef8c356ae783aacdc824fadba3cf1e /setuptools/sandbox.py
parentc96c3ffba9f8a6ab43e6f3d57349a46e3076c374 (diff)
downloadpython-setuptools-git-d48cb39b4666477da1d954d3604023095c233869.tar.gz
Use new style format strings and expand args to variables for better clarity of purpose.
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-xsetuptools/sandbox.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
index 4711fec2..53964f4b 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -478,7 +478,7 @@ class SandboxViolation(DistutilsError):
"""A setup script attempted to modify the filesystem outside the sandbox"""
tmpl = textwrap.dedent("""
- SandboxViolation: %s%r %s
+ SandboxViolation: {cmd}{args!r} {kwargs}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
@@ -490,4 +490,5 @@ class SandboxViolation(DistutilsError):
""").lstrip()
def __str__(self):
- return self.tmpl % self.args
+ cmd, args, kwargs = self.args
+ return self.tmpl.format(**locals())