mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
add newline to source before compilation
This commit is contained in:
parent
003720235b
commit
4e051d459d
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ def process(template, filename, destname, copy_codefragment,
|
|||
text = fp.read()
|
||||
fp.close()
|
||||
try:
|
||||
code = compile(text, filename, "exec")
|
||||
code = compile(text + '\n', filename, "exec")
|
||||
except SyntaxError, arg:
|
||||
raise BuildError, "Syntax error in script %s: %s" % (filename, arg)
|
||||
except EOFError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue