From: Serge Rehbinder Date: Wed, 14 Sep 2016 11:29:07 +0000 (+0200) Subject: sat generate: fix bug when getting python version X-Git-Tag: 5.0.0a1~126 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e50db53fe052651ce433ff1ea2aebb0b9a8df736;p=tools%2Fsat.git sat generate: fix bug when getting python version --- diff --git a/commands/generate.py b/commands/generate.py index a08a4b3..b2eadfe 100644 --- a/commands/generate.py +++ b/commands/generate.py @@ -281,7 +281,8 @@ def check_yacsgen(config, directory, logger): pv = os.getenv("PYTHON_VERSION") if pv is None: - pv = '.'.join(config.PRODUCT.prerequis["Python"].split('.')[:2]) + python_info = src.product.get_product_config(config, "Python") + pv = '.'.join(python_info.version.split('.')[:2]) assert pv is not None, "$PYTHON_VERSION not defined" yacsgen_dir = os.path.join(yacsgen_dir, "lib", "python%s" % pv, "site-packages")