Commit 920a0534 authored by Aurélien Dunand's avatar Aurélien Dunand Committed by Seblu

Catch SyntaxError in check_scripts

Rewrap this exception to ISError to avoid threat them as unexpected error.
Signed-off-by: Seblu's avatarSébastien Luttringer <sebastien.luttringer@smartjog.com>
parent 1fe258bb
......@@ -577,7 +577,10 @@ class SourceImage(Image):
assert(isinstance(fn, unicode))
assert(isinstance(fc, str))
arrow(fn)
compile(fc, fn.encode(locale.getpreferredencoding()), "exec")
try:
compile(fc, fn.encode(locale.getpreferredencoding()), "exec")
except SyntaxError as e:
raise ISError(exception=e)
arrowlevel(-1)
def run_build(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment