From 0b3cecdbab8a110147e5e50ee56de4d59860f738 Mon Sep 17 00:00:00 2001 From: Serge Rehbinder Date: Wed, 20 Jul 2016 14:47:37 +0200 Subject: [PATCH] good raise in case of missing compilation script --- src/product.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/product.py b/src/product.py index 007e2ce..211c0b6 100644 --- a/src/product.py +++ b/src/product.py @@ -205,13 +205,11 @@ def get_product_config(config, product_name): script_path = src.find_file_in_lpath(script_name, config.PATHS.PRODUCTPATH, "compil_scripts") + if not script_path: + raise src.SatException(_("Compilation script not found: %s") % + script_name) prod_info.compil_script = script_path - - # Check script existence - if not os.path.exists(prod_info.compil_script): - raise src.SatException(_("Compilation script not found: %s") % - prod_info.compil_script) - + # Check that the script is executable if not os.access(prod_info.compil_script, os.X_OK): raise src.SatException( -- 2.39.2