Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.build
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
Xavier Thompson
slapos.recipe.build
Commits
d157d8a1
Commit
d157d8a1
authored
Feb 22, 2017
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
script option: fix IndentationError with buildout 2, if some lines are indented.
parent
e4d1eb12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
slapos/recipe/build/__init__.py
slapos/recipe/build/__init__.py
+6
-1
No files found.
slapos/recipe/build/__init__.py
View file @
d157d8a1
...
@@ -28,6 +28,7 @@ import errno
...
@@ -28,6 +28,7 @@ import errno
import
logging
import
logging
import
os
import
os
from
platform
import
uname
from
platform
import
uname
import
re
import
setuptools
import
setuptools
import
shlex
import
shlex
import
shutil
import
shutil
...
@@ -271,8 +272,12 @@ class Script(EnvironMixin):
...
@@ -271,8 +272,12 @@ class Script(EnvironMixin):
for
k
in
'url'
,
'md5sum'
,
'path'
:
for
k
in
'url'
,
'md5sum'
,
'path'
:
self
.
options
[
k
]
=
self
.
options
.
get
(
k
,
''
).
strip
()
self
.
options
[
k
]
=
self
.
options
.
get
(
k
,
''
).
strip
()
self
.
script
=
self
.
options
[
'script'
]
self
.
script
=
self
.
options
[
'script'
]
if
self
.
script
:
if
self
.
options
.
get
(
'format'
,
'yes'
)
in
TRUE_LIST
:
if
self
.
options
.
get
(
'format'
,
'yes'
)
in
TRUE_LIST
:
self
.
script
=
self
.
script
%
self
.
options
self
.
script
=
self
.
script
%
self
.
options
if
re
.
match
(
r'^\
s
', self.script):
# Buildout 2 keeps all indentation unless all lines have the same indentation.
self.script = '
if
True
:
\
n
' + self.script
if self.options.get('
keep
-
on
-
error
', '').strip().lower() in TRUE_LIST:
if self.options.get('
keep
-
on
-
error
', '').strip().lower() in TRUE_LIST:
self.logger.debug('
Keeping
directories
in
case
of
errors
')
self.logger.debug('
Keeping
directories
in
case
of
errors
')
self.keep_on_error = True
self.keep_on_error = True
...
...
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