Browse Source

use dash instead of underscore in options as well

Yohann Rebattu 9 years ago
parent
commit
6d76cfa5aa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      radicale/__main__.py

+ 2 - 2
radicale/__main__.py

@@ -73,7 +73,8 @@ def run():
     for section, values in config.INITIAL_CONFIG.items():
     for section, values in config.INITIAL_CONFIG.items():
         group = optparse.OptionGroup(parser, section)
         group = optparse.OptionGroup(parser, section)
         for option, default_value in values.items():
         for option, default_value in values.items():
-            long_name = '--{0}-{1}'.format(section, option)
+            long_name = '--{0}-{1}'.format(
+                section, option.replace('_', '-'))
             kwargs = {}
             kwargs = {}
             args = [long_name]
             args = [long_name]
             if default_value.lower() in ('true', 'false'):
             if default_value.lower() in ('true', 'false'):
@@ -117,7 +118,6 @@ def run():
         section = group.title
         section = group.title
         for option in group.option_list:
         for option in group.option_list:
             key = option.dest
             key = option.dest
-            print(key)
             config_key = key.split('_', 1)[1]
             config_key = key.split('_', 1)[1]
             if key:
             if key:
                 value = getattr(options, key)
                 value = getattr(options, key)