diff options
| author | Julien Danjou <julien@danjou.info> | 2012-10-26 16:55:17 +0200 |
|---|---|---|
| committer | Julien Danjou <julien@danjou.info> | 2012-10-26 16:55:17 +0200 |
| commit | aca1805d911caefe14a73edb6ced281cf54e7ad2 (patch) | |
| tree | 6ccec48bc1aa2ff4444ff25e1c24040f48a0d7d5 /openstack/common | |
| parent | d887090b5a31672e4a12f302b3818e2b0933bef0 (diff) | |
| download | oslo-aca1805d911caefe14a73edb6ced281cf54e7ad2.tar.gz oslo-aca1805d911caefe14a73edb6ced281cf54e7ad2.tar.xz oslo-aca1805d911caefe14a73edb6ced281cf54e7ad2.zip | |
cfg: fix required if option has a dash
If an option has a dash in it and is required, the check fails because it
tries to self._get() on the name (with dash) rather than the dest (with
underscore).
Change-Id: I6448019f70f98bc2e58a325d0cf9ce88b8bb085b
Signed-off-by: Julien Danjou <julien@danjou.info>
Diffstat (limited to 'openstack/common')
| -rw-r--r-- | openstack/common/cfg.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack/common/cfg.py b/openstack/common/cfg.py index bbef49b..5adbb9a 100644 --- a/openstack/common/cfg.py +++ b/openstack/common/cfg.py @@ -1507,7 +1507,7 @@ class ConfigOpts(collections.Mapping): if ('default' in info or 'override' in info): continue - if self._get(opt.name, group) is None: + if self._get(opt.dest, group) is None: raise RequiredOptError(opt.name, group) def _parse_cli_opts(self, args): |
