Before python 2.5, a try block could not have both an except and finally block. (See http://docs.python.org/reference/compound_stmts.html#the-try-statement).
In pre-2.5 python, you can get around this using two nested try blocks. try: try: blah() except: yada() finally: something() So there are two ways to resolve this: Use a newer version of python, or change the code to use two nested try blocks. Sam On Mon, Mar 9, 2009 at 1:05 AM, gutongsedeyo...@gmail.com < gutongsedeyo...@gmail.com> wrote: > > 1) I am trying to compile Chromium with hammer/scons on Windows, with > the latest source, and I am getting the following error message: > > scons: Reading SConscript files ... > File "D:\chromium\src\tools\grit\grit\scons.py", line 83 > > finally: > > ^ > > SyntaxError: invalid syntax > > 2) I looked into the "\src\tools\grit\grit\scons.py" file, find a "try- > except-finally" branch around line 83 mentioned in the error message. > > 3) I tried to write a test Python script, both "try-except" and "try- > finally" works, however when I wrote "try-except-finally" I got the > same error message like above. Download python 2.6 and run the "try- > except-finally" test again, it works fine! > > Maybe some files under "\src\third_party\python_24" are incorrect? > > > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---