mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
use dash instead of underscore in options as well
This commit is contained in:
parent
fb3e733596
commit
6d76cfa5aa
1 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,8 @@ def run():
|
|||
for section, values in config.INITIAL_CONFIG.items():
|
||||
group = optparse.OptionGroup(parser, section)
|
||||
for option, default_value in values.items():
|
||||
long_name = '--{0}-{1}'.format(section, option)
|
||||
long_name = '--{0}-{1}'.format(
|
||||
section, option.replace('_', '-'))
|
||||
kwargs = {}
|
||||
args = [long_name]
|
||||
if default_value.lower() in ('true', 'false'):
|
||||
|
@ -117,7 +118,6 @@ def run():
|
|||
section = group.title
|
||||
for option in group.option_list:
|
||||
key = option.dest
|
||||
print(key)
|
||||
config_key = key.split('_', 1)[1]
|
||||
if key:
|
||||
value = getattr(options, key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue