mirror of
https://github.com/python/cpython.git
synced 2025-11-18 18:31:56 +00:00
Conversion of exceptions over from faked-up classes to new-style C types.
This commit is contained in:
parent
1fcdc232db
commit
7b9558d37d
16 changed files with 2316 additions and 2163 deletions
|
|
@ -95,15 +95,7 @@ def _maybe_compile(compiler, source, filename, symbol):
|
|||
|
||||
if code:
|
||||
return code
|
||||
try:
|
||||
e1 = err1.__dict__
|
||||
except AttributeError:
|
||||
e1 = err1
|
||||
try:
|
||||
e2 = err2.__dict__
|
||||
except AttributeError:
|
||||
e2 = err2
|
||||
if not code1 and e1 == e2:
|
||||
if not code1 and repr(err1) == repr(err2):
|
||||
raise SyntaxError, err1
|
||||
|
||||
def _compile(source, filename, symbol):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue