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
ab68bb07
Commit
ab68bb07
authored
3 years ago
by
Karl-Hermann Wieners
Browse files
Options
Downloads
Patches
Plain Diff
getconfig: added option to control indentation of output
parent
963eee96
Branches
basic_dataset
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES.txt
+5
-0
5 additions, 0 deletions
CHANGES.txt
getconfig
+3
-1
3 additions, 1 deletion
getconfig
with
8 additions
and
1 deletion
CHANGES.txt
+
5
−
0
View file @
ab68bb07
...
...
@@ -9,6 +9,11 @@ Release Changes
Release 1.1.6
=============
Global
------
* getconfig: added option to control indentation of output
Tools
-----
...
...
This diff is collapsed.
Click to expand it.
getconfig
+
3
−
1
View file @
ab68bb07
...
...
@@ -29,6 +29,8 @@ command_line.add_argument('update', nargs='?', default='update',
help
=
'
update script file name [%(default)s]
'
)
command_line
.
add_argument
(
'
-V
'
,
'
--version
'
,
action
=
'
version
'
,
version
=
package_info
.
version
)
command_line
.
add_argument
(
'
-i
'
,
'
--indent-string
'
,
default
=
'
'
,
help
=
'
set indent string [%(default)s]
'
)
args
=
command_line
.
parse_args
()
...
...
@@ -38,7 +40,7 @@ except IOError as error:
die
(
"'
{0}
'
: {1}
"
.
format
(
error
.
filename
,
error
.
strerror
))
config_data
=
ConfigObj
(
update_data
.
get_config_file
(),
interpolation
=
False
,
write_empty_values
=
True
)
write_empty_values
=
True
,
indent_type
=
args
.
indent_string
)
for
d
in
update_data
.
get_config_dicts
():
config_data
.
merge
(
d
)
...
...
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