Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xin Wang
codes-dev
Commits
76e3f082
Commit
76e3f082
authored
Apr 01, 2015
by
Jonathan Jenkins
Browse files
ignore unrelated parameters passed into filter_configs
parent
e908dd07
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/codes_filter_configs.py.in
View file @
76e3f082
...
...
@@ -48,11 +48,6 @@ def main():
v
=
tp
[
i
+
1
]
tdict
[
tp
[
i
]]
=
v
# quick check - make sure pairs are actually in the config
for
k
in
tdict
:
if
k
not
in
cfg
.
replace_map
:
raise
ValueError
(
"key "
+
k
+
" not in original config"
)
# hack - if we are using an output prefix, append the "dot" here
if
args
.
output_prefix
==
None
:
args
.
output_prefix
=
""
...
...
@@ -62,7 +57,7 @@ def main():
# (cfg iterator returns nothing, eval'd for side effects)
for
i
,
_
in
enumerate
(
cfg
):
for
k
in
tdict
:
if
tdict
[
k
]
!=
cfg
.
replace_map
[
k
]:
if
k
not
in
cfg
.
replace_map
or
tdict
[
k
]
!=
cfg
.
replace_map
[
k
]:
break
else
:
stdout
.
write
(
args
.
output_prefix
+
str
(
i
)
+
"
\n
"
)
...
...
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