]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Access correct key for template name
authorPaul Michali <pcm@cisco.com>
Fri, 12 Sep 2014 18:16:35 +0000 (14:16 -0400)
committerPaul Michali <pcm@cisco.com>
Tue, 16 Sep 2014 10:56:30 +0000 (06:56 -0400)
commita2ef082cb0b25d14595a8810adb16df3f9661e43
tree5d40c245c05be787fc52d7a11fef7369a8fd1615
parent3b678bf99ac9f83fb337fe427b8a5ed6de36a015
Access correct key for template name

When an exception occurs while loading the config agent driver, the
handler tries to log a message, but accesses the wrong key to get the
template name. This causes another exception, which masks the original
exception.

This change accesses the correct key and performs logging inside a
with block to (defensively) preserve the exception context.

Change-Id: I3991bc4c509bbd8d68f7a1c8c8314404f2e0eafa
Closes-Bug: #1368900
neutron/plugins/cisco/cfg_agent/device_drivers/driver_mgr.py