sugar.util: use logging.exception instead of traceback.format_exc()
logging.exception() handles exceptions nicely for us, no need to explicitly use traceback. Reviewed-by: James Cameron <quozl@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org> CC: Aleksey Lim <alsroot@member.fsf.org>
This commit is contained in:
parent
3d227102c4
commit
431e36a427
@ -29,7 +29,6 @@ import gettext
|
||||
import tempfile
|
||||
import logging
|
||||
import atexit
|
||||
import traceback
|
||||
|
||||
|
||||
_ = lambda msg: gettext.dgettext('sugar-toolkit', msg)
|
||||
@ -336,7 +335,7 @@ def _cleanup_temp_files():
|
||||
try:
|
||||
os.unlink(path)
|
||||
except:
|
||||
logging.error(traceback.format_exc())
|
||||
logging.exception('Exception occured in _cleanup_temp_files')
|
||||
|
||||
atexit.register(_cleanup_temp_files)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user