[omniORB] Return Struct o None
Antonio Beamud Montero
antonio.beamud at gmail.com
Thu Mar 26 18:11:15 GMT 2009
Hi all:
I've defined a struct, and a method that returns this struct type. The
problem is when I try to return a null value instead this struct. For
example:
idl:
...
struct SInfo {
wstring id;
wstring address;
wstring tlf;
}
SInfo get_personal_info(in wstring name);
in python:
..
def get_personal_info(self, name):
if name in self.personal_dict:
return SInfo(self.personal_dict[name]['id'],
self.personal_dict[name]['address'],
self.personal_dict[name]['tlf'])
else:
return None
If the name exists, all works well, but if not exists, the next error
appears:
omniORB.CORBA.BAD_PARAM:
ORBA.BAD_PARAM(omniORB.BAD_PARAM_WrongPythonType, CORBA.COMPLETED_MAYBE)
I've tried with None, Corba.types.NoneType and CORBA.Object._nil
, but the same error.
Thanks.
More information about the omniORB-list
mailing list