Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mkexp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esmenv
mkexp
Commits
e7a9149f
Commit
e7a9149f
authored
1 year ago
by
Karl-Hermann Wieners
Browse files
Options
Downloads
Patches
Plain Diff
setconfig: remove quotes from section names
parent
728ad88f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES.txt
+1
-0
1 addition, 0 deletions
CHANGES.txt
setconfig
+3
-0
3 additions, 0 deletions
setconfig
with
4 additions
and
0 deletions
CHANGES.txt
+
1
−
0
View file @
e7a9149f
...
...
@@ -21,6 +21,7 @@ Tools
* improve detection of model and build dirs
* support different generations of launch logic
* support stand-alone atmosphere scripts
* setconfig: remove quotes from section names (may be disabled)
Release 1.3.1
=============
...
...
This diff is collapsed.
Click to expand it.
setconfig
+
3
−
0
View file @
e7a9149f
...
...
@@ -42,6 +42,8 @@ command_line.add_argument('--inline-comments' , '-c', action='store_true',
'
(BETA)
'
)
command_line
.
add_argument
(
'
--trailing-space
'
,
'
-t
'
,
action
=
'
store_true
'
,
help
=
'
remove white space at end of lines
'
)
command_line
.
add_argument
(
'
--keep-section-quotes
'
,
action
=
'
store_true
'
,
help
=
'
do not remove quotes from section names
'
)
args
=
command_line
.
parse_args
()
...
...
@@ -101,6 +103,7 @@ config_data.write(lines)
lines
.
seek
(
0
)
for
line
in
io
.
TextIOWrapper
(
lines
):
if
args
.
inline_comments
:
line
=
re
.
sub
(
r
'
= (.*?) #
'
,
r
'
= \1 #
'
,
line
)
if
not
args
.
keep_section_quotes
:
line
=
re
.
sub
(
r
'
\[
"
(.*?)
"
\]
'
,
r
'
[\1]
'
,
line
)
if
args
.
trailing_space
:
print
(
line
.
rstrip
())
else
:
...
...
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