Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BIP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
BIP
Commits
8083b839
Commit
8083b839
authored
2 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: Warn when name collision between regular setting and selector
parent
8d83e1dc
No related branches found
No related tags found
1 merge request
!3
BIP configuration system
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bip/utils/config.py
+10
-0
10 additions, 0 deletions
bip/utils/config.py
with
10 additions
and
0 deletions
bip/utils/config.py
+
10
−
0
View file @
8083b839
...
...
@@ -67,6 +67,8 @@ def nested_lookup(d, key):
if
key
[
0
]
not
in
d
:
raise
KeyError
()
if
not
isinstance
(
d
,
dict
):
return
d
d
=
d
[
key
[
0
]]
...
...
@@ -253,7 +255,15 @@ class Config:
val
=
nested_lookup
(
settings
,
pat
)
except
KeyError
:
continue
# If an entry with a selector name as key is
# present, and is not a dictionary (e.g.
# "subject = 1"), this is probably an error
# in the config file, or the selectors the
# user has provided. Warn and carry on
if
not
isinstance
(
val
,
dict
):
log
.
warning
(
'
Ignoring primitive selector value (%s = %s)
'
,
pat
,
val
)
continue
log
.
debug
(
'
Updating settings from selector: %s
'
,
pat
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment