summaryrefslogtreecommitdiffstats
path: root/openstack/common
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-11-23 11:45:04 +0000
committerMark McLoughlin <markmc@redhat.com>2012-11-23 11:46:45 +0000
commitceb4aa7fe9e05b762f451045c1b92a3d7b696eac (patch)
tree020624d0819c81935ebe3b3930a40e380dd3d525 /openstack/common
parentb4c0767e5529eb5d58aed90643354dbee83efefe (diff)
downloadoslo-ceb4aa7fe9e05b762f451045c1b92a3d7b696eac.tar.gz
oslo-ceb4aa7fe9e05b762f451045c1b92a3d7b696eac.tar.xz
oslo-ceb4aa7fe9e05b762f451045c1b92a3d7b696eac.zip
Fix broken --help with CommonConfigOpts
Since we switched to argparse, the way help strings are interpolated have changed and broken --help with the options registered by CommonConfigOpts. Fix and add a new test case which would catch the issue. Change-Id: I10e42efe4721e22ff41d0efbf390c805ccb9a6a0
Diffstat (limited to 'openstack/common')
-rw-r--r--openstack/common/cfg.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack/common/cfg.py b/openstack/common/cfg.py
index e967c61..98d10b4 100644
--- a/openstack/common/cfg.py
+++ b/openstack/common/cfg.py
@@ -1652,12 +1652,12 @@ class CommonConfigOpts(ConfigOpts):
metavar='FORMAT',
help='A logging.Formatter log message format string which may '
'use any of the available logging.LogRecord attributes. '
- 'Default: %default'),
+ 'Default: %(default)s'),
StrOpt('log-date-format',
default=DEFAULT_LOG_DATE_FORMAT,
metavar='DATE_FORMAT',
- help='Format string for %(asctime)s in log records. '
- 'Default: %default'),
+ help='Format string for %%(asctime)s in log records. '
+ 'Default: %(default)s'),
StrOpt('log-file',
metavar='PATH',
help='(Optional) Name of log file to output to. '