Merge branch 'master' of github.com:willmcgugan/rich

This commit is contained in:
Will McGugan 2020-12-11 16:18:35 +00:00
commit 26a27bbf28
2 changed files with 10 additions and 1 deletions

View File

@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Table.add_row style argument now applies to entire line and not just cells
- Added end_section parameter to Table.add_row to force a line underneath row
## Fixed
- Fixed suppressed traceback context https://github.com/willmcgugan/rich/issues/468
## [9.3.0] - 2020-12-1
### Added

View File

@ -261,6 +261,7 @@ class Traceback:
stacks: List[Stack] = []
is_cause = False
while True:
stack = Stack(
exc_type=str(exc_type.__name__),
@ -310,7 +311,11 @@ class Traceback:
continue
cause = exc_value.__context__
if cause and cause.__traceback__:
if (
cause
and cause.__traceback__
and not getattr(exc_value, "__suppress_context__", False)
):
exc_type = cause.__class__
exc_value = cause
traceback = cause.__traceback__