diff options
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py index 3b46c0b050..a2eb539c02 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -487,9 +487,10 @@ class TracebackException: self._load_lines() @classmethod - def from_exception(cls, exc, *args, **kwargs): + def from_exception(self, exc, *args, **kwargs): """Create a TracebackException from an exception.""" - return cls(type(exc), exc, exc.__traceback__, *args, **kwargs) + return TracebackException( + type(exc), exc, exc.__traceback__, *args, **kwargs) def _load_lines(self): """Private API. force all lines in the stack to be loaded.""" |