]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
sat generate: fix bug when getting python version
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Wed, 14 Sep 2016 11:29:07 +0000 (13:29 +0200)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Wed, 14 Sep 2016 11:29:07 +0000 (13:29 +0200)
commands/generate.py

index a08a4b39d8aadff0e107e043a0ce013c213b3792..b2eadfe0ee2226c6b882efc19d4c4831951c6316 100644 (file)
@@ -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")