From ceb4aa7fe9e05b762f451045c1b92a3d7b696eac Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 23 Nov 2012 11:45:04 +0000 Subject: 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 --- openstack/common/cfg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openstack') 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. ' -- cgit