try / except / finally causes parser to fail

Issue #105 invalid
created an issue

It appears that there is a problem with the new try / except / finally statement which is supported by python as of version 2.5.

Example: {{{


import sys from coverage import coverage coverage(data_file='coverage.dat', auto_data=True).start()

def main(): try: print "hello world"

    print "exception"

    print "world contacted"

if name == "main": main() }}}

Then if you run {{{


import sys from coverage import *

cov = coverage(data_file='coverage.dat') cov.load() }}}

You will see the following exception: CoverageException: Couldn't parse '/interact/test/' as Python source: 'invalid syntax' at line 14

(The line that the error happens on is the finally following the except.)

Comments (2)

  1. Log in to comment