From: crouzet Date: Fri, 11 Jan 2019 15:03:36 +0000 (+0100) Subject: sat #8922 : affichage d'un message clair pour un chemin non existant d'un prerequis... X-Git-Tag: 5.3.0~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d36792963cfc5149240dccafc1c10a7cb6645f6;p=tools%2Fsat.git sat #8922 : affichage d'un message clair pour un chemin non existant d'un prerequis de type fixed --- diff --git a/commands/source.py b/commands/source.py index 23b41d7..e9295cc 100644 --- a/commands/source.py +++ b/commands/source.py @@ -393,9 +393,12 @@ def get_product_sources(config, logger.write('%s ' % src.printcolors.printc(src.OK_STATUS), 3, False) - msg = _('INFORMATION : Not doing anything because the product' - ' is of type "fixed".\n') - logger.write(msg, 3) + msg = "FIXED : %s\n" % product_info.install_dir + + if not os.path.isdir(product_info.install_dir): + logger.warning("The fixed path do not exixts!! Please check it : %s\n" % product_info.install_dir) + else: + logger.write(msg, 3) return True # if the get_source is not in [git, archive, cvs, svn, fixed, native] diff --git a/src/product.py b/src/product.py index 5bd554d..3fd1a2f 100644 --- a/src/product.py +++ b/src/product.py @@ -136,7 +136,11 @@ def get_product_config(config, product_name, with_install_dir=True): # In case of a fixed product, # define the install_dir (equal to the version) - if prod_info is not None and os.path.isdir(version): + if prod_info is not None and \ + (os.path.isdir(version) or version.startswith("/")): + # we consider a (fixed) path existing paths; + # or paths starting with '/' (the objective is to print a correct + # message to the user in case of non existing path.) prod_info.install_dir = version prod_info.get_source = "fixed"