[omniORB] omniORBpy: Problem with enumerations
Duncan Grisby
duncan at grisby.org
Tue Jan 6 14:08:44 GMT 2004
On Tuesday 6 January, "W. Borgert" wrote:
> Quoting Sebastian Rittau <srittau at jroger.in-berlin.de>:
> > If on the other hand I start server2.py everything works fine. The only
> > difference between these two implementations is that in the former the
> > object is implemented in a separate module, while in the latter it is
> > implemented in the main server module. Am I doing something wrong or is
> > this a strange bug?
>
> Strange indeed. I was able to reproduce this behaviour on
> Solaris 5.8 (*). However, I commented out the 'import omniORB'
> and 'omniORB.importIDL(...)' lines in both server1.py and
> enumobjimpl.py and it works. Still strange.
I haven't tried the code, but I assume the problem is that the same
IDL is dynamically imported more than once. That causes the enum
objects used in the different modules to be different objects, so when
omniORB is checking that a value is one of the possible enum items, it
doesn't match. There's no sensible way to avoid the problem, other
than to say not to use importIDL on the same file more than once. If
you used omniidl separately and did a normal Python import, it would
work fine.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list