Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/creactistore/_templates/lib/olpcfr/tools/registry.py
diff options
context:
space:
mode:
Diffstat (limited to 'creactistore/_templates/lib/olpcfr/tools/registry.py')
-rw-r--r--creactistore/_templates/lib/olpcfr/tools/registry.py48
1 files changed, 0 insertions, 48 deletions
diff --git a/creactistore/_templates/lib/olpcfr/tools/registry.py b/creactistore/_templates/lib/olpcfr/tools/registry.py
deleted file mode 100644
index 7e575c3..0000000
--- a/creactistore/_templates/lib/olpcfr/tools/registry.py
+++ /dev/null
@@ -1,48 +0,0 @@
-
-# python import
-import logging
-
-
-class Registry(object):
-
- class __Singleton:
- """Our singleton object.
- """
-
- def __init__(self):
- """Create the new singleton for a simple use.
- """
- # ensure config
- self.__dict = dict()
-
- def get_info(self, path):
- # ..
- if path in self.__dict:
- return self.__dict[path]
- else:
- return None
-
- def set_info(self, path, info):
- # clear previous
- if path in self.__dict:
- del self.__dict[path]
- else:
- pass
- # ...
- self.__dict[path] = info
-
- # singleton instance
- instance = None
-
- def __new__(c, force=False):
- """Singleton new init.
- """
- # if doesn't already initialized
- if not Registry.instance \
- or force is True:
- # create a new instance
- Registry.instance = Registry.__Singleton()
- else:
- pass
- # return the manager object
- return Registry.instance