Commit d48cb39b authored by Jason R. Coombs's avatar Jason R. Coombs

Use new style format strings and expand args to variables for better clarity of purpose.

parent c96c3ffb
...@@ -478,7 +478,7 @@ class SandboxViolation(DistutilsError): ...@@ -478,7 +478,7 @@ class SandboxViolation(DistutilsError):
"""A setup script attempted to modify the filesystem outside the sandbox""" """A setup script attempted to modify the filesystem outside the sandbox"""
tmpl = textwrap.dedent(""" tmpl = textwrap.dedent("""
SandboxViolation: %s%r %s SandboxViolation: {cmd}{args!r} {kwargs}
The package setup script has attempted to modify files on your system The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted. that are not within the EasyInstall build area, and has been aborted.
...@@ -490,4 +490,5 @@ class SandboxViolation(DistutilsError): ...@@ -490,4 +490,5 @@ class SandboxViolation(DistutilsError):
""").lstrip() """).lstrip()
def __str__(self): def __str__(self):
return self.tmpl % self.args cmd, args, kwargs = self.args
return self.tmpl.format(**locals())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment