From d9561cd8695fcfb19e533a50d8b9ee7c08ba996d Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Mon, 12 Aug 2024 14:07:04 -0700 Subject: [PATCH] nit Signed-off-by: Kevin Su --- flytekit/bin/entrypoint.py | 2 +- flytekit/exceptions/scopes.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/flytekit/bin/entrypoint.py b/flytekit/bin/entrypoint.py index 141cd11ec0..1b8e181cc1 100644 --- a/flytekit/bin/entrypoint.py +++ b/flytekit/bin/entrypoint.py @@ -188,7 +188,7 @@ def get_traceback_str(e: Exception) -> str: format_str = "Traceback (most recent call last):\n" "\n {traceback}\n" "\n" "Message:\n" "\n" " {message}" value = e.value if isinstance(e, FlyteUserRuntimeException) else e - return format_str.format(traceback=tb_str, message=f"{type(value)}: {value}") + return format_str.format(traceback=tb_str, message=f"{type(value).__name__}: {value}") def get_one_of(*args) -> str: diff --git a/flytekit/exceptions/scopes.py b/flytekit/exceptions/scopes.py index 7c891341b4..c3a0809320 100644 --- a/flytekit/exceptions/scopes.py +++ b/flytekit/exceptions/scopes.py @@ -42,7 +42,6 @@ def verbose_message(self): lines = _format_tb(top_tb, limit=limit) lines = [line.rstrip() for line in lines] - lines = "\n".join(lines).split("\n") traceback_str = "\n ".join([""] + lines) format_str = "Traceback (most recent call last):\n" "{traceback}\n" "\n" "Message:\n" "\n" " {message}"