diff --git a/Lib/py_compile.py b/Lib/py_compile.py index 1d884d008e7..f7a200204ca 100644 --- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -141,7 +141,7 @@ def compile(file, cfile=None, dfile=None, doraise=False): try: codeobject = __builtin__.compile(codestring, dfile or file,'exec') except Exception as err: - py_exc = PyCompileError(err.__class__,err.args,dfile or file) + py_exc = PyCompileError(err.__class__, err, dfile or file) if doraise: raise py_exc else: