Skip to content

Commit

Permalink
Merge "use 'exc_info=1' instead of import traceback"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Aug 5, 2013
2 parents 851520e + 6d0d9e2 commit 2380fef
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions cinder/volume/manager.py
Expand Up @@ -306,8 +306,7 @@ def create_volume(self, context, volume_id, request_spec=None,
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')
Expand Down Expand Up @@ -388,11 +387,6 @@ def create_volume(self, context, volume_id, request_spec=None,
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):
Expand Down

0 comments on commit 2380fef

Please sign in to comment.