1- execute python script files (runSalome -u) in globals and not in globals,locals
as it was done before
2- don't use obsolete omniORB initref form in runRemote.sh
3- put _narrow (SALOMEDS_Study_i.cxx) into a try catch : _narrow can throw CORBA::Exception
NSPORT=$2
export NSPORT
initref="NameService=corbaname::"$1":$2"
-echo "ORBInitRef $initref" > $OMNIORB_CONFIG
+echo "InitRef = $initref" > $OMNIORB_CONFIG
#go to the requested working directory if any
if test "x$3" == "xWORKINGDIR"; then
scrname = toimport[ i ]
if len(scrname) > 2 and (len(scrname) - string.rfind(scrname, ".py") == 3):
print 'executing',scrname
- doexec = 'execfile(\"%s\")'%scrname
- exec doexec
+ execfile(scrname,globals())
else:
print 'importing',scrname
doimport = 'import ' + scrname
Engines::MachineList_var listOfMachines =
resManager->GetFittingResources(params, clist);
- container = contManager->FindOrStartContainer(params,
- listOfMachines);
+ container = contManager->FindOrStartContainer(params, listOfMachines);
if (CORBA::is_nil(container))
{
INFOS("machine " << _refMachine << " unreachable");
_theFileRef = container->createFileRef(_origFileName.c_str());
if (CORBA::is_nil(_theFileRef))
{
- INFOS("imposssible to create fileRef on " << _refMachine);
+ INFOS("impossible to create fileRef on " << _refMachine);
return "";
}
}
if (sco->ComponentIOR(IOREngine)) {
// we have found the associated engine to write the data
MESSAGE ( "We have found an engine for data type :"<< sco->ComponentDataType());
- CORBA::Object_var obj = _orb->string_to_object(IOREngine);
- if (!CORBA::is_nil(obj)) {
- SALOMEDS::Driver_var anEngine = SALOMEDS::Driver::_narrow(obj) ;
-
- if (!anEngine->_is_nil()) {
- SALOMEDS::unlock();
- anEngine->Close(sco);
- SALOMEDS::lock();
- }
- }
+ //_narrow can throw a corba exception
+ try
+ {
+ CORBA::Object_var obj = _orb->string_to_object(IOREngine);
+ if (!CORBA::is_nil(obj))
+ {
+ SALOMEDS::Driver_var anEngine = SALOMEDS::Driver::_narrow(obj) ;
+ if (!anEngine->_is_nil())
+ {
+ SALOMEDS::unlock();
+ anEngine->Close(sco);
+ SALOMEDS::lock();
+ }
+ }
+ }
+ catch (CORBA::Exception&)
+ {/*pass*/ }
}
}