Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
d6959fca
Commit
d6959fca
authored
May 21, 2017
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dedent and left strip to store the template inside the class.
parent
7474f891
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
setuptools/sandbox.py
setuptools/sandbox.py
+13
-8
No files found.
setuptools/sandbox.py
View file @
d6959fca
...
...
@@ -7,6 +7,7 @@ import itertools
import
re
import
contextlib
import
pickle
import
textwrap
import
six
from
six.moves
import
builtins
,
map
...
...
@@ -476,13 +477,17 @@ WRITE_FLAGS = functools.reduce(
class SandboxViolation(DistutilsError):
"""
A
setup
script
attempted
to
modify
the
filesystem
outside
the
sandbox
"""
def __str__(self):
return """
SandboxViolation
:
%
s
%
r
%
s
tmpl = textwrap.dedent("""
SandboxViolation
:
%
s
%
r
%
s
The
package
setup
script
has
attempted
to
modify
files
on
your
system
that
are
not
within
the
EasyInstall
build
area
,
and
has
been
aborted
.
The
package
setup
script
has
attempted
to
modify
files
on
your
system
that
are
not
within
the
EasyInstall
build
area
,
and
has
been
aborted
.
This
package
cannot
be
safely
installed
by
EasyInstall
,
and
may
not
support
alternate
installation
locations
even
if
you
run
its
setup
script
by
hand
.
Please
inform
the
package
's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
""").lstrip()
This
package
cannot
be
safely
installed
by
EasyInstall
,
and
may
not
support
alternate
installation
locations
even
if
you
run
its
setup
script
by
hand
.
Please
inform
the
package
's author and the EasyInstall
maintainers to find out if a fix or workaround is available.""" % self.args
def __str__(self):
return self.tmpl % self.args
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment