[omniORB] omniORBPy breaks when IDL modules are named identically to native Python modules

David Fugate dfugate at ras.ucalgary.ca
Tue Aug 30 13:10:58 BST 2005


Hi, I think a developer I work with has discovered a bug in omniORBPy 
(2.6). Essentially we have an IDL module given a name identical to a 
native Python module ('exec'). Within this IDL module, a couple of enums 
are defined. As soon as I try to import the Python CORBA stubs (which 
are correctly placed in "_exec"), it seems there are problems importing 
the individual enumerations which are missing an '_'. Is this a bug?

Thanks,

David Fugate


[dfugate at fox ICD]$cat /u/dfugate/introot/idl/ExecInterfaces.idl
#ifndef _EXECINTERFACES_IDL_
#define _EXECINTERFACES_IDL_
#pragma prefix "alma"
module exec {
     enum SubSystem { CONTROL_SUBSYSTEM, CORRELATOR_SUBSYSTEM,
                      TELCAL_SUBSYSTEM, QUICKLOOK_SUBSYSTEM,
                      SCHEDULING_SUBSYSTEM, PIPELINE_SUBSYSTEM,
                      OTHER_SUBSYSTEM };

     enum ReqType { URGENT_REQUEST, NORMAL_REQUEST, INFO };
};
#endif

[dfugate at fox ICD]$python -i
Python 2.4 (#1, Mar 16 2005, 15:22:06)
[GCC 3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import _exec
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/u/dfugate/introot/lib/python/site-packages/_exec/__init__.py", 
line 6,
in ?
     import ExecInterfaces_idl
   File 
"/u/dfugate/introot/lib/python/site-packages/ExecInterfaces_idl.py", line
  26, in ?
     _0__exec.SubSystem = omniORB.Enum("IDL:alma/exec/SubSystem:1.0", 
(_0_exec.CO
NTROL_SUBSYSTEM, _0_exec.CORRELATOR_SUBSYSTEM, _0_exec.TELCAL_SUBSYSTEM, 
_0_exec
.QUICKLOOK_SUBSYSTEM, _0_exec.SCHEDULING_SUBSYSTEM, 
_0_exec.PIPELINE_SUBSYSTEM,
_0_exec.OTHER_SUBSYSTEM,))
NameError: name '_0_exec' is not defined
 >>>
[dfugate at fox ICD]$

-- 
There are 10 types of people in the world. Those that understand binary 
and those that don't.



More information about the omniORB-list mailing list