summaryrefslogtreecommitdiffstats
path: root/cobbler/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/config.py')
-rw-r--r--cobbler/config.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/cobbler/config.py b/cobbler/config.py
index 3444ded..3a9bd79 100644
--- a/cobbler/config.py
+++ b/cobbler/config.py
@@ -30,11 +30,25 @@ import serializer
class Config:
+ has_loaded = False
+ __shared_state = {}
+
+
def __init__(self,api):
+
"""
Constructor. Manages a definitive copy of all data collections with weakrefs
- poiting back into the class so they can understand each other's contents
+ pointing back into the class so they can understand each other's contents
"""
+ self.__dict__ == Config.__shared_state
+ if not Config.has_loaded:
+ self.__load(api)
+
+
+ def __load(self,api):
+
+ Config.has_loaded = True
+
self.api = api
self._distros = distros.Distros(weakref.proxy(self))
self._profiles = profiles.Profiles(weakref.proxy(self))