]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
fix the generate command
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Fri, 23 Sep 2016 13:15:52 +0000 (15:15 +0200)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Fri, 23 Sep 2016 13:15:52 +0000 (15:15 +0200)
commands/generate.py
src/product.py

index 6e162d24929deba4f9458784745f06113ed7805b..75193bdf841ef87b3872dd5c12a7966ac28afe9b 100644 (file)
@@ -178,15 +178,13 @@ def generate_component(config, compo, product_info, context, header, logger):
     return result
 
 def build_context(config, logger):
-    environ_info = {}
     products_list = [ 'KERNEL', 'GUI' ]
-    environ_info['products'] = config.APPLICATION.products
     ctxenv = src.environment.SalomeEnviron(config,
                                            src.environment.Environ(dict(
                                                                    os.environ)),
                                            True)
     ctxenv.silent = True
-    ctxenv.set_full_environ(logger, environ_info)
+    ctxenv.set_full_environ(logger, config.APPLICATION.products.keys())
 
     dicdir = {}
     for p in products_list:
@@ -227,7 +225,7 @@ def check_module_generator(directory=None):
     """
     undo = False
     if directory is not None and directory not in sys.path:
-        sys.path.insert(0, dir)
+        sys.path.insert(0, directory)
         undo = True
     
     res = None
@@ -237,7 +235,7 @@ def check_module_generator(directory=None):
         res = info[1]
     except ImportError:
         if undo:
-            sys.path.remove(dir)
+            sys.path.remove(directory)
         res = None
 
     return res
index 05db3a0c6631b2939fe5e2e8bb594670ae0d27a6..4eb5c28fa9338b0545f3733b03731a6283aa79a5 100644 (file)
@@ -661,8 +661,8 @@ def product_is_generated(product_info):
     :rtype: boolean
     '''
     return ("properties" in product_info and
-            "generated" in product_info.properties and
-            product_info.properties.generated == "yes")
+            "generate" in product_info.properties and
+            product_info.properties.generate == "yes")
 
 def get_product_components(product_info):
     '''Get the component list to generate with the product