fail on Synax Error: invalid syntax

Issue #47 resolved
charles.merriam created an issue fails when the last line on the source file does not end in a LF. This is a known exec() wart. Lines with just spaces in the last line do trigger this failure. Usually, people just a "LF" to be sure.

{{{ #!bash

(live_dectools)~/p/decorator_toolkit/dectools (master)$ coverage run test/ Traceback (most recent call last): File "/home/chasm/.virtualenvs/live_dectools/bin/coverage", line 8, in <module> load_entry_point('coverage==3.2', 'console_scripts', 'coverage')() File "/home/chasm/.virtualenvs/live_dectools/lib/python2.6/site-packages/coverage-3.2-py2.6-linux-i686.egg/coverage/", line 590, in main status = CoverageScript().command_line(sys.argv[1:]) File "/home/chasm/.virtualenvs/live_dectools/lib/python2.6/site-packages/coverage-3.2-py2.6-linux-i686.egg/coverage/", line 468, in command_line self.run_python_file(args[0], args) File "/home/chasm/.virtualenvs/live_dectools/lib/python2.6/site-packages/coverage-3.2-py2.6-linux-i686.egg/coverage/", line 43, in run_python_file exec_function(source, filename, main_mod.dict) File "<exec_function>", line 2, in exec_function File "test/", line 59

SyntaxError: invalid syntax


Branch cb8970df breaks Branch ccd69d1 does not break git://

Hope you enjoyed Pycon. Loved your talk. email if you have questions;

Comments (1)

  1. Log in to comment