summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Nemec <bnemec@redhat.com>2017-06-05 16:52:08 +0000
committerBen Nemec <bnemec@redhat.com>2017-06-05 16:52:08 +0000
commit297ba5a1f04a7f9452e2c8eebb4fd1753a9e27ba (patch)
tree7ca4505cf7032f7879c085e2e994dbf66723ee35
parentd32af197a75dfae5670e6fe75f1bdb2626c75a88 (diff)
downloadoslo-config-297ba5a1f04a7f9452e2c8eebb4fd1753a9e27ba.tar.gz
Cast generator_options to dict
At some point in the development of this feature, I cleaned up an "unnecessary" loop that was writing the generator_options. It turns out this wasn't as unnecessary as I thought. A ConfigOpts instance looks dict-like enough to pass the unit tests, but when it's actually passed to the yaml formatter it fails because yaml doesn't know what to do with it. Instead of reintroducing the loop, it seems just casting the ConfigOpts to a dict will work. Change-Id: I0aaac8485259cc80a430bb80684d1bfe1c7f91c3
-rw-r--r--oslo_config/generator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/oslo_config/generator.py b/oslo_config/generator.py
index a509d75..bbf1737 100644
--- a/oslo_config/generator.py
+++ b/oslo_config/generator.py
@@ -581,7 +581,7 @@ def _generate_machine_readable_data(groups, conf):
deprecated_opt['replacement_name'] = entry['name']
deprecated_opt['replacement_group'] = group_name
deprecated_options[group].append(deprecated_opt)
- output_data['generator_options'] = conf
+ output_data['generator_options'] = dict(conf)
return output_data