From 9ae59eec9e3e471998cb906c9d00404524eea7ad Mon Sep 17 00:00:00 2001 From: dharmendra Date: Wed, 13 Mar 2019 16:00:25 +0000 Subject: [PATCH] Fix dict.keys() TypeError issue. In python3, dict.keys() returns a dict_keys object rather than a list. This patch will make it compatible with py3 as well as py2. Change-Id: I889c45fa57603f264f941e0025dc9232c370f1b0 Closes-Bug: #1819935 --- tacker/vnfm/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tacker/vnfm/plugin.py b/tacker/vnfm/plugin.py index 3156582f8..1e2d8ad78 100644 --- a/tacker/vnfm/plugin.py +++ b/tacker/vnfm/plugin.py @@ -829,7 +829,7 @@ class VNFMPlugin(vnfm_db.VNFMPluginDb, VNFMMgmtMixin): # filtered in _get_vnf_triggers(). # Getting action from trigger to decide which process_alarm_for_vnf # method will be called. - if trigger['trigger'].keys()[0]\ + if list(trigger['trigger'])[0]\ in constants.RESERVATION_POLICY_ACTIONS: if not self._vnf_reservation_monitor.process_alarm_for_vnf( vnf_id, trigger):