Salome HOME
Correct the non concurrency of init script for python remote node on HP Containers.
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 16 Sep 2014 13:05:38 +0000 (15:05 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 16 Sep 2014 13:05:38 +0000 (15:05 +0200)
src/runtime/PythonNode.cxx

index b762486e3151a66823d19f2718d33a1e0ebacfd1..2ebeab40ee87af5ff6c2fa324a40252c6569f366 100644 (file)
@@ -207,25 +207,25 @@ void PythonEntry::commonRemoteLoadPart3(InlineNode *reqNode, Engines::Container_
         Py_DECREF(new_stderr);
         throw Exception("Error during load");
       }
-    if(isInitializeRequested)
-      {//This one is called only once at initialization in the container if an init-script is specified.
-        try
-          {
-            std::string zeInitScriptKey(container->getProperty(HomogeneousPoolContainer::INITIALIZE_SCRIPT_KEY));
-            if(!zeInitScriptKey.empty())
-              pynode->executeAnotherPieceOfCode(zeInitScriptKey.c_str());
-          }
-        catch( const SALOME::SALOME_Exception& ex )
-          {
-            std::string msg="Exception on PythonNode::loadRemote python invocation of initializisation py script !";
-            msg += '\n';
-            msg += ex.details.text.in();
-            reqNode->setErrorDetails(msg);
-            throw Exception(msg);
-          }
-      }
-    DEBTRACE( "---------------End PyNode::loadRemote function---------------" );
   }
+  if(isInitializeRequested)
+    {//This one is called only once at initialization in the container if an init-script is specified.
+      try
+      {
+          std::string zeInitScriptKey(container->getProperty(HomogeneousPoolContainer::INITIALIZE_SCRIPT_KEY));
+          if(!zeInitScriptKey.empty())
+            pynode->executeAnotherPieceOfCode(zeInitScriptKey.c_str());
+      }
+      catch( const SALOME::SALOME_Exception& ex )
+      {
+          std::string msg="Exception on PythonNode::loadRemote python invocation of initializisation py script !";
+          msg += '\n';
+          msg += ex.details.text.in();
+          reqNode->setErrorDetails(msg);
+          throw Exception(msg);
+      }
+      DEBTRACE( "---------------End PyNode::loadRemote function---------------" );
+    }
 }
 
 void PythonEntry::commonRemoteLoad(InlineNode *reqNode)