Merge "Access correct key for template name"

This commit is contained in:
Jenkins 2014-09-19 09:14:45 +00:00 committed by Gerrit Code Review
commit 8ccf2a44ec

View File

@ -75,11 +75,12 @@ class DeviceDriverManager(object):
self._drivers[resource_id] = driver
return driver
except ImportError:
LOG.exception(_("Error loading cfg agent driver %(driver)s for "
"hosting device template %(t_name)s(%(t_id)s)"),
{'driver': driver_class, 't_id': hd_id,
't_name': hosting_device['name']})
with excutils.save_and_reraise_exception(reraise=False):
LOG.exception(_("Error loading cfg agent driver %(driver)s "
"for hosting device template "
"%(t_name)s(%(t_id)s)"),
{'driver': driver_class, 't_id': hd_id,
't_name': resource['name']})
raise cfg_exceptions.DriverNotExist(driver=driver_class)
except KeyError as e:
with excutils.save_and_reraise_exception(reraise=False):