From ab5938065f136f3b498e19bcc443e6eb72e5cc70 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 22 Feb 2018 11:59:13 +0000 Subject: [PATCH] Fix py35 python tests In python3, dict.values() is a dictview, which cannot be indexed. This change also makes the tox py35 job voting and adds it to the gate jobs. Change-Id: I925e53c2e20a75fef1a942003f5e61f6bfeedcdc Story: #2001637 Task: #6646 --- kayobe/cli/commands.py | 4 ++-- zuul.d/project.yaml | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/kayobe/cli/commands.py b/kayobe/cli/commands.py index 1e1c7056d..aece7d52c 100644 --- a/kayobe/cli/commands.py +++ b/kayobe/cli/commands.py @@ -382,7 +382,7 @@ class SeedHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, if not hostvars: self.app.LOG.error("No hosts in the seed group") sys.exit(1) - hostvars = hostvars.values()[0] + hostvars = list(hostvars.values())[0] ansible_user = hostvars.get("kayobe_ansible_user") if not ansible_user: self.app.LOG.error("Could not determine kayobe_ansible_user " @@ -674,7 +674,7 @@ class OvercloudHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, if not hostvars: self.app.LOG.error("No hosts in the overcloud group") sys.exit(1) - hostvars = hostvars.values()[0] + hostvars = list(hostvars.values())[0] ansible_user = hostvars.get("kayobe_ansible_user") if not ansible_user: self.app.LOG.error("Could not determine kayobe_ansible_user " diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index d9bda963f..905258dba 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -4,9 +4,7 @@ jobs: - openstack-tox-pep8 - openstack-tox-py27 - # FIXME(mgoddard): python 3.5 jobs currently failing. - - openstack-tox-py35: - voting: false + - openstack-tox-py35 - build-openstack-sphinx-docs - kayobe-tox-ansible-syntax - kayobe-tox-ansible @@ -16,6 +14,7 @@ jobs: - openstack-tox-pep8 - openstack-tox-py27 + - openstack-tox-py35 - build-openstack-sphinx-docs - kayobe-tox-ansible-syntax - kayobe-tox-ansible