Merge "use 'exc_info=1' instead of import traceback"

This commit is contained in:
Jenkins 2013-08-05 05:06:34 +00:00 committed by Gerrit Code Review
commit 2380feff7c

View File

@ -306,8 +306,7 @@ class VolumeManager(manager.SchedulerDependentManager):
filter_properties)
if rescheduled:
# log the original build error
self._log_original_error(exc_info)
LOG.error(_('Unexpected Error: '), exc_info=exc_info)
msg = (_('Creating %(volume_id)s %(snapshot_id)s '
'%(image_id)s was rescheduled due to '
'%(reason)s')
@ -388,11 +387,6 @@ class VolumeManager(manager.SchedulerDependentManager):
self._notify_about_volume_usage(context, volume_ref, "create.end")
return volume_ref['id']
def _log_original_error(self, exc_info):
type_, value, tb = exc_info
LOG.error(_('Error: %s') %
traceback.format_exception(type_, value, tb))
def _reschedule_or_error(self, context, volume_id, exc_info,
snapshot_id, image_id, request_spec,
filter_properties):