]> SALOME platform Git repositories - modules/multipr.git/commitdiff
Salome HOME
Remove "import SMESH" Python commmand from "dump python" functionality
authorapo <apo@opencascade.com>
Mon, 16 Jul 2007 14:58:49 +0000 (14:58 +0000)
committerapo <apo@opencascade.com>
Mon, 16 Jul 2007 14:58:49 +0000 (14:58 +0000)
src/MULTIPR/MULTIPR_i.cxx

index ada3ff3214a0af4702f91193f4e509766d03ae12..cfc9ddbf768d0a5ba3b367feab4915d3d28d6ae3 100644 (file)
@@ -619,10 +619,16 @@ MULTIPR_ORB::string_array* MULTIPR_Obj_i::partitionneGrain(
     MULTIPR::TPythonDump(_engine) << "new_parts = " << this << ".partitionneGrain(\""
                                   << pPartName << "\", " << pNbParts << ", " << pPartitionner << ")";
   }
-  catch (multipr::RuntimeException& e)
+  catch (std::exception& exc)
   {
-    e.dump(cout);
-    THROW_SALOME_CORBA_EXCEPTION("Unable to partition group", SALOME::INTERNAL_ERROR);
+    THROW_SALOME_CORBA_EXCEPTION(exc.what(), SALOME::INTERNAL_ERROR);
+  }
+  catch (multipr::RuntimeException& exc)
+  {
+    std::ostringstream aStream;
+    exc.dump(aStream);
+    aStream<<ends;
+    THROW_SALOME_CORBA_EXCEPTION(aStream.str().c_str(), SALOME::INTERNAL_ERROR);
   }
 
   return mySeq._retn();
@@ -1326,7 +1332,7 @@ std::string MULTIPR_Gen_i::DumpPython_impl (int theStudyID,
   std::string aGen = MULTIPR::TPythonDump::MULTIPRGenName();
 
   // set initial part of a script
-  std::string aScript ("import salome, SMESH\n");
+  std::string aScript ("import salome\n");
   aScript += "import MULTIPR_ORB\n\n";
   aScript += "def RebuildData(theStudy):\n";