Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
6
Merge Requests
6
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
d66efee8
Commit
d66efee8
authored
Jun 19, 2020
by
Godefroid Chapelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: unannotate mutates in place
Solution: return new dict to avoid subtle bugs
parent
7f93ff04
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+3
-7
No files found.
src/zc/buildout/buildout.py
View file @
d66efee8
...
@@ -253,15 +253,11 @@ def _print_annotate(data, verbose, chosen_sections, basedir):
...
@@ -253,15 +253,11 @@ def _print_annotate(data, verbose, chosen_sections, basedir):
def
_unannotate_section
(
section
):
def
_unannotate_section
(
section
):
for
key
in
section
:
return
{
key
:
entry
.
value
for
key
,
entry
in
section
.
items
()}
section
[
key
]
=
section
[
key
].
value
return
section
def
_unannotate
(
data
):
def
_unannotate
(
data
):
for
key
in
data
:
return
{
key
:
_unannotate_section
(
section
)
for
key
,
section
in
data
.
items
()}
data
[
key
]
=
_unannotate_section
(
data
[
key
])
return
data
def
_format_picked_versions
(
picked_versions
,
required_by
):
def
_format_picked_versions
(
picked_versions
,
required_by
):
...
@@ -454,7 +450,7 @@ class Buildout(DictMixin):
...
@@ -454,7 +450,7 @@ class Buildout(DictMixin):
# provide some defaults before options are parsed
# provide some defaults before options are parsed
# because while parsing options those attributes might be
# because while parsing options those attributes might be
# used already (Gottfried Ganssauge)
# used already (Gottfried Ganssauge)
buildout_section
=
data
[
'buildout'
]
buildout_section
=
self
.
_raw
[
'buildout'
]
# Try to make sure we have absolute paths for standard
# Try to make sure we have absolute paths for standard
# directories. We do this before doing substitutions, in case
# directories. We do this before doing substitutions, in case
...
...
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