bindings/python/ns3modulegen.py
changeset 3582 96fa2a7b5f88
parent 3575 1f5d9b97a1a2
child 3639 8e69ebf086f1
--- a/bindings/python/ns3modulegen.py	Tue Sep 02 10:12:14 2008 -0700
+++ b/bindings/python/ns3modulegen.py	Tue Sep 02 10:44:28 2008 -0700
@@ -113,11 +113,17 @@
 
     # if GtkConfigStore support is disabled, disable the class wrapper
     if 'DISABLE_GTK_CONFIG_STORE' in os.environ:
-        root_module.classes.remove(root_module['ns3::GtkConfigStore'])
+        try:
+            root_module.classes.remove(root_module['ns3::GtkConfigStore'])
+        except KeyError:
+            pass
 
     # if no sqlite, the class SqliteDataOutput is disabled
     if 'SQLITE_STATS' in os.environ:
-        root_module.classes.remove(root_module['ns3::SqliteDataOutput'])
+        try:
+            root_module.classes.remove(root_module['ns3::SqliteDataOutput'])
+        except KeyError:
+            pass
 
     root_module.generate(out, '_ns3')