mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
py3: use format_exc instead of print_exception
This commit is contained in:
+2
-8
@@ -1,6 +1,6 @@
|
||||
"""Manages logging configuration for dvc repo."""
|
||||
|
||||
import io
|
||||
import traceback
|
||||
import logging.config
|
||||
import logging.handlers
|
||||
|
||||
@@ -101,14 +101,8 @@ class ColorFormatter(logging.Formatter):
|
||||
return description.format(message=message, exception=exception)
|
||||
|
||||
def _walk_exc(self, exc_info):
|
||||
import traceback
|
||||
|
||||
buffer = io.StringIO()
|
||||
|
||||
traceback.print_exception(*exc_info, file=buffer)
|
||||
|
||||
exc = exc_info[1]
|
||||
tb = buffer.getvalue()
|
||||
tb = traceback.format_exc(*exc_info)
|
||||
|
||||
exc_list = [str(exc)]
|
||||
tb_list = [tb]
|
||||
|
||||
Reference in New Issue
Block a user