diff options
author | Richard Jones <richard@commonground.com.au> | 2006-05-27 12:29:24 (GMT) |
---|---|---|
committer | Richard Jones <richard@commonground.com.au> | 2006-05-27 12:29:24 (GMT) |
commit | 7b9558d37dc7f2c6ae984cf25d16b9bf5e532b77 (patch) | |
tree | 70f313905c1ef84f4ba281cab615c32e06820460 /Lib/codeop.py | |
parent | 1fcdc232dbfbd05b92eaed42bf9f779d27c55a92 (diff) | |
download | cpython-7b9558d37dc7f2c6ae984cf25d16b9bf5e532b77.zip cpython-7b9558d37dc7f2c6ae984cf25d16b9bf5e532b77.tar.gz cpython-7b9558d37dc7f2c6ae984cf25d16b9bf5e532b77.tar.bz2 |
Conversion of exceptions over from faked-up classes to new-style C types.
Diffstat (limited to 'Lib/codeop.py')
-rw-r--r-- | Lib/codeop.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/codeop.py b/Lib/codeop.py index daa7eb8..5616d92 100644 --- a/Lib/codeop.py +++ b/Lib/codeop.py @@ -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): |