summaryrefslogtreecommitdiff
path: root/Lib/traceback.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-12-21 14:17:12 -0600
committerZachary Ware <zachary.ware@gmail.com>2015-12-21 14:17:12 -0600
commitf2b234443c53cb73dc749da57d952286437cb15a (patch)
treef21b8b25f5bfbe76a2c85ae62f6d06060dd03372 /Lib/traceback.py
parent26b842a82d9ae7d30c692080bf352a0ef78a626c (diff)
parent977fd6d7c6593680fd5ffdebb262a2a3f2f24387 (diff)
downloadcpython-f2b234443c53cb73dc749da57d952286437cb15a.tar.gz
Issue #25827: Merge with 3.5
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r--Lib/traceback.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index 9b69da0e8a..1bac6eb56b 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -487,10 +487,9 @@ class TracebackException:
self._load_lines()
@classmethod
- def from_exception(self, exc, *args, **kwargs):
+ def from_exception(cls, exc, *args, **kwargs):
"""Create a TracebackException from an exception."""
- return TracebackException(
- type(exc), exc, exc.__traceback__, *args, **kwargs)
+ return cls(type(exc), exc, exc.__traceback__, *args, **kwargs)
def _load_lines(self):
"""Private API. force all lines in the stack to be loaded."""