diff options
| author | Damien Ciabrini <dciabrin@redhat.com> | 2019-01-17 19:06:21 +0100 |
|---|---|---|
| committer | Michele Baldessari <michele@acksyn.org> | 2019-01-18 10:37:44 +0100 |
| commit | 8344c8ea21428c5978d3c5e7ae74d6e43dd8ba95 (patch) | |
| tree | 3de122645f4015db3e0a6e35046b1a08f3a98c20 /docker/openstack-base | |
| parent | 453ad6ca43dea18a48f7baf9197ba917056813cb (diff) | |
| download | kolla-8344c8ea21428c5978d3c5e7ae74d6e43dd8ba95.tar.gz kolla-8344c8ea21428c5978d3c5e7ae74d6e43dd8ba95.zip | |
Make set_config.py compatible with both Py2 and Py3
When asserting the validity of config files, we currently
use viewkeys(), which has been removed in Python3, so a kolla
container cannot set the config with Python3 only.
"Traceback (most recent call last):",
" File \"/usr/local/bin/kolla_set_configs\", line 406, in main",
" config = load_config()",
" File \"/usr/local/bin/kolla_set_configs\", line 297, in load_config",
" validate_config(config)",
" File \"/usr/local/bin/kolla_set_configs\", line 238, in validate_config",
" if not data.viewkeys() >= required_keys:",
"AttributeError: 'dict' object has no attribute 'viewkeys'"
Use keys() instead, which is compatible with both Python2 and
Python3, and has no visible performance disadvantage and wrap it in a
set() call so that we are guranteed to compare sets.
Change-Id: I5f53c8f5a390a9df3ebb60659ebdcef41e3a9cad
Co-Authored-By: Michele Baldessari <michele@acksyn.org>
Diffstat (limited to 'docker/openstack-base')
0 files changed, 0 insertions, 0 deletions
