From: Serge Rehbinder Date: Wed, 20 Jul 2016 12:47:37 +0000 (+0200) Subject: good raise in case of missing compilation script X-Git-Tag: 5.0.0a0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b3cecdbab8a110147e5e50ee56de4d59860f738;p=tools%2Fsat.git good raise in case of missing compilation script --- 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(