[omniORB] omniORBpy Exception Question (and omniidl exception patch).
Randy Wiser
randyw@amc.com
Mon, 27 Mar 2000 17:31:59 -0800
--=====================_1663611216==_
Content-Type: text/plain; charset="us-ascii"
I'm fairly new to CORBA and omniORBpy, and have a question about the Python stubs generated by omniidl.
Why do the stubs generated by omniidl inherit from class Exception in the standard Python module exceptions.py, but the generated __init__ methods fail to call the __init__ method (exceptions.Exception.__init__) in the class they inherit from?
I've attached a patch for the omniidl Python back-end (omniORB 3.0 or 2.8) which seems to correct this, but I'm curious if it is the 'right thing' to do?
Thanks in advance,
- Randy
--=====================_1663611216==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="python.patch"
Index: python.py
===================================================================
RCS file: /cvsroot/omniORBpy/omniidl_be/python.py,v
retrieving revision 1.23
diff -u -r1.23 python.py
--- python.py 2000/03/17 12:28:09 1.23
+++ python.py 2000/03/24 00:03:56
@@ -348,7 +348,8 @@
"""
exception_class_init = """\
- def __init__(self@mnames@):"""
+ def __init__(self@mnames@):
+ CORBA.UserException.__init__(self@mnames@)"""
exception_init_member = """\
self.@mname@ = @mname@"""
--=====================_1663611216==_--