From 77ca96b5469069e1f96f665f46e96bfaa8961b6c Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 9 Mar 2012 11:34:25 +0000 Subject: Update cfg from openstack-common Change-Id: Ic4eba98d6fe1868f8da82e02eb2ab3d6e37b1b40 --- nova/openstack/common/cfg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nova/openstack/common/cfg.py b/nova/openstack/common/cfg.py index 18ae002df..586aa7744 100644 --- a/nova/openstack/common/cfg.py +++ b/nova/openstack/common/cfg.py @@ -691,7 +691,7 @@ class OptGroup(object): return self._optparse_group -class ConfigOpts(collections.Mapping, object): +class ConfigOpts(collections.Mapping): """ Config options which may be set on the command line or in config files. @@ -964,6 +964,10 @@ class ConfigOpts(collections.Mapping, object): """Print the usage message for the current program.""" self._oparser.print_usage(file) + def print_help(self, file=None): + """Print the help message for the current program.""" + self._oparser.print_help(file) + def _get(self, name, group=None): """Look up an option value. @@ -1076,7 +1080,7 @@ class ConfigOpts(collections.Mapping, object): not_read_ok = filter(lambda f: f not in read_ok, config_files) raise ConfigFilesNotFoundError(not_read_ok) - class GroupAttr(collections.Mapping, object): + class GroupAttr(collections.Mapping): """ A helper class representing the option values of a group as a mapping -- cgit