Modular bindings: fix binding code generation when the module does not use ns3::Object
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 24 Mar 2011 17:01:06 +0000
changeset 6943 9ae2596b385d
parent 6942 3b9ce3a727a5
child 6944 48bb30c366e0
Modular bindings: fix binding code generation when the module does not use ns3::Object
bindings/python/ns3modulegen_core_customizations.py
--- a/bindings/python/ns3modulegen_core_customizations.py	Thu Mar 24 16:57:27 2011 +0000
+++ b/bindings/python/ns3modulegen_core_customizations.py	Thu Mar 24 17:01:06 2011 +0000
@@ -331,8 +331,10 @@
     ## order to support kwargs only and to translate kwargs into ns3
     ## attributes, etc.
     ## ---------------------------------------------------------------------
-    Object = module['ns3::Object']
-
+    try:
+        Object = module['ns3::Object']
+    except KeyError:
+        return
 
     ## add a GetTypeId method to all generatd helper classes
     def helper_class_hook(helper_class):