ProjectController.py
changeset 2462 ed6b0e905fcb
parent 2459 21164625b393
child 2463 8742337a9fe3
--- a/ProjectController.py	Tue Nov 27 10:54:13 2018 +0100
+++ b/ProjectController.py	Tue Nov 27 13:34:14 2018 +0100
@@ -279,10 +279,14 @@
     def LoadLibraries(self):
         self.Libraries = []
         TypeStack = []
-        for libname, clsname, _default in features.libraries:
-            if self.BeremizRoot.Libraries is not None and \
-               getattr(self.BeremizRoot.Libraries,
-                       "Enable_" + libname + "_Library"):
+        for libname, clsname, lib_enabled in features.libraries:
+            if self.BeremizRoot.Libraries is not None:
+                enable_attr = getattr(self.BeremizRoot.Libraries,
+                                      "Enable_" + libname + "_Library")
+                if enable_attr is not None:
+                    lib_enabled = enable_attr
+
+            if lib_enabled:
                 Lib = GetClassImporter(clsname)()(self, libname, TypeStack)
                 TypeStack.append(Lib.GetTypes())
                 self.Libraries.append(Lib)