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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
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):
...
@@ -58,13 +58,15 @@ class WriteRecipe(GenericBaseRecipe):
self
.
parser
.
write
(
file
)
self
.
parser
.
write
(
file
)
# If the file or section do not exist
# If the file or section do not exist
except
ConfigParser
.
NoSectionError
,
IOError
:
except
ConfigParser
.
NoSectionError
,
IOError
:
self
.
full_install
()
self
.
install
()
install
=
update
=
lambda
self
:
[]
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
)
self
.
parser
.
read
(
self
.
path
)
if
self
.
parser
.
has_section
(
self
.
name
):
self
.
parser
.
remove_section
(
self
.
name
)
self
.
parser
.
add_section
(
self
.
name
)
self
.
parser
.
add_section
(
self
.
name
)
for
key
in
self
.
options
:
for
key
in
self
.
options
:
self
.
parser
.
set
(
self
.
name
,
key
,
self
.
options
[
key
])
self
.
parser
.
set
(
self
.
name
,
key
,
self
.
options
[
key
])
...
@@ -72,6 +74,10 @@ class WriteRecipe(GenericBaseRecipe):
...
@@ -72,6 +74,10 @@ class WriteRecipe(GenericBaseRecipe):
self
.
parser
.
write
(
file
)
self
.
parser
.
write
(
file
)
def
update
(
self
):
pass
class
ReadRecipe
(
GenericBaseRecipe
):
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