]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
use 'exc_info=1' instead of import traceback
authorKun Huang <gareth@unitedstack.com>
Sun, 21 Jul 2013 16:19:08 +0000 (00:19 +0800)
committerKun Huang <gareth@unitedstack.com>
Mon, 22 Jul 2013 15:27:49 +0000 (23:27 +0800)
commit6d0d9e288f9333d88a73f4e0f0222a0064e905e9
tree22b85fc7c606d19df8d4596ab0b010aa49e642d3
parent767a018880e234f5355f6a9777cc22be4bb6e5d0
use 'exc_info=1' instead of import traceback

We need store traceback message in log sometime. Python logging module
already provide a argument to do that. For example, we could:

logger.error('msg', exc_info=1)
logger.debug(e, exc_info=(type_,value_,tb))
logger.exception('msg') # exception add exc_info automaticly

Change-Id: Iaf541e4f4ea139d9315ac1990f0e6079c8f8a20d
cinder/volume/manager.py