summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-20 00:54:27 +0000
committerGerrit Code Review <review@openstack.org>2013-02-20 00:54:27 +0000
commit5fb2d6ef952658df5d3f85f1f1ad520cb955037f (patch)
treeb0cb58fef710a74c768cc141ea0f38f4fa83c44c /nova/api
parenta1cb060a14aa58465b9a6d7aa15433cd483e73c3 (diff)
parent479254f368ecfb78bf6913dc26230e378999436e (diff)
downloadnova-5fb2d6ef952658df5d3f85f1f1ad520cb955037f.tar.gz
nova-5fb2d6ef952658df5d3f85f1f1ad520cb955037f.tar.xz
nova-5fb2d6ef952658df5d3f85f1f1ad520cb955037f.zip
Merge "Fix key check in instance actions formatter."
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/instance_actions.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/nova/api/openstack/compute/contrib/instance_actions.py b/nova/api/openstack/compute/contrib/instance_actions.py
index 4ab32ad4c..ecacde7bf 100644
--- a/nova/api/openstack/compute/contrib/instance_actions.py
+++ b/nova/api/openstack/compute/contrib/instance_actions.py
@@ -71,15 +71,13 @@ class InstanceActionsController(wsgi.Controller):
def _format_action(self, action_raw):
action = {}
for key in ACTION_KEYS:
- if key in action_raw:
- action[key] = action_raw[key]
+ action[key] = action_raw.get(key)
return action
def _format_event(self, event_raw):
event = {}
for key in EVENT_KEYS:
- if key in event_raw:
- event[key] = event_raw[key]
+ event[key] = event_raw.get(key)
return event
@wsgi.serializers(xml=InstanceActionsTemplate)