Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
ad16bbaf
Commit
ad16bbaf
authored
Dec 27, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recipe-zeroknown: updating buildout parameters resets config section
(better in development purposes)
parent
c9868a24
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
slapos/recipe/zeroknown.py
slapos/recipe/zeroknown.py
+10
-4
No files found.
slapos/recipe/zeroknown.py
View file @
ad16bbaf
...
...
@@ -58,13 +58,15 @@ class WriteRecipe(GenericBaseRecipe):
self
.
parser
.
write
(
file
)
# If the file or section do not exist
except
ConfigParser
.
NoSectionError
,
IOError
:
self
.
full_install
()
install
=
update
=
lambda
self
:
[]
self
.
install
()
def
full_install
(
self
):
def
install
(
self
):
"""XXX-Nicolas : when some parameter's value is changed in
buildout profile, this will override custom user defined values"""
self
.
parser
.
read
(
self
.
path
)
if
self
.
parser
.
has_section
(
self
.
name
):
self
.
parser
.
remove_section
(
self
.
name
)
self
.
parser
.
add_section
(
self
.
name
)
for
key
in
self
.
options
:
self
.
parser
.
set
(
self
.
name
,
key
,
self
.
options
[
key
])
...
...
@@ -72,6 +74,10 @@ class WriteRecipe(GenericBaseRecipe):
self
.
parser
.
write
(
file
)
def
update
(
self
):
pass
class
ReadRecipe
(
GenericBaseRecipe
):
"""
"""
...
...
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