mirror of https://github.com/Textualize/rich.git
Stop showing colon after exception type when there is no message
This commit is contained in:
parent
7b17bff680
commit
73ad8ef1f7
|
@ -444,11 +444,13 @@ class Traceback:
|
||||||
(f"{stack.exc_type}: ", "traceback.exc_type"),
|
(f"{stack.exc_type}: ", "traceback.exc_type"),
|
||||||
highlighter(stack.syntax_error.msg),
|
highlighter(stack.syntax_error.msg),
|
||||||
)
|
)
|
||||||
else:
|
elif stack.exc_value:
|
||||||
yield Text.assemble(
|
yield Text.assemble(
|
||||||
(f"{stack.exc_type}: ", "traceback.exc_type"),
|
(f"{stack.exc_type}: ", "traceback.exc_type"),
|
||||||
highlighter(stack.exc_value),
|
highlighter(stack.exc_value),
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
yield Text.assemble((f"{stack.exc_type}", "traceback.exc_type"))
|
||||||
|
|
||||||
if not last:
|
if not last:
|
||||||
if stack.is_cause:
|
if stack.is_cause:
|
||||||
|
|
Loading…
Reference in New Issue