diff --git a/installsystems/image.py b/installsystems/image.py index 435fc5b0e373d9beeb48529615c801e8fca9e984..fcfe5ab426650521f70292ed766a27fe8979f9dd 100644 --- a/installsystems/image.py +++ b/installsystems/image.py @@ -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):