Python: code being checked shouldn't inherit future statements.
This commit is contained in:
parent
c82a9a92e9
commit
dfe1e025ee
@ -8,6 +8,6 @@ if len(argv) != 2:
|
||||
exit(1)
|
||||
|
||||
try:
|
||||
compile(open(argv[1]).read(), argv[1], 'exec')
|
||||
compile(open(argv[1]).read(), argv[1], 'exec', 0, 1)
|
||||
except SyntaxError as err:
|
||||
print('%s:%s:%s: %s' % (err.filename, err.lineno, err.offset, err.msg))
|
||||
|
Loading…
Reference in New Issue
Block a user