From: Finn B. <bc...@us...> - 2001-02-25 15:36:11
|
Update of /cvsroot/jython/jython/Tools/jythonc In directory usw-pr-cvs1:/tmp/cvs-serv22094 Modified Files: SimpleCompiler.py Log Message: tryexcept(): Fix bug #229252. The else boolean is now set whenever an exception is caught. Index: SimpleCompiler.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/SimpleCompiler.py,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** SimpleCompiler.py 2000/12/17 13:37:12 2.12 --- SimpleCompiler.py 2001/02/25 15:37:21 2.13 *************** *** 645,650 **** [exctmp, exc[0].asAny()]) newbody = [] - if elseClause is not None: - newbody.append(jast.Set(elseBool, jast.False)) if len(exc) == 2: --- 645,648 ---- *************** *** 669,673 **** catchBody = jast.MultiIf(tests, ifelse) ! catchBody = jast.Block([setexc, catchBody]) self.frame.freetemp(exctmp) --- 667,676 ---- catchBody = jast.MultiIf(tests, ifelse) ! catchBody = [setexc, catchBody] ! ! if elseClause is not None: ! catchBody = [jast.Set(elseBool, jast.False), catchBody] ! ! catchBody = jast.Block([catchBody]) self.frame.freetemp(exctmp) |