From 728c08695fb774fb0b68dcd1699f563334363650 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Thu, 5 Apr 2018 01:18:28 +0300 Subject: [PATCH] exceptions: catch format_exc() exception Signed-off-by: Ruslan Kuprieiev --- dvc/exceptions.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dvc/exceptions.py b/dvc/exceptions.py index ea55d451d..1bf79dbc9 100644 --- a/dvc/exceptions.py +++ b/dvc/exceptions.py @@ -4,5 +4,10 @@ import traceback class DvcException(Exception): def __init__(self, msg, cause=None): self.cause = cause - self.cause_tb = traceback.format_exc() if cause else None + self.case_tb = None + if cause: + try: + self.cause_tb = traceback.format_exc() + except Exception: + pass super(DvcException, self).__init__(msg)