def addDynStorage(name, storage): if name not in _DYN_STORAGE: _DYN_STORAGE[name] = storage else: raise error('Storage "{0:>s}" is exists'.format(name))
def _getStorage(_self): global _DYN_STORAGE if self.__name not in _DYN_STORAGE: raise error('Dyn storage "{0:>s}" not found'.format( self.__name)) return _DYN_STORAGE[self.__name]
def __init__(self, name): super(storage_getter, self).__init__() if name not in _STORAGE: raise error('Storage "{0:>s}" not found'.format(name)) self.__name = name
def _getStorage(_self): global _DYN_STORAGE if self.__name not in _DYN_STORAGE: raise error('Dyn storage "{0:>s}" not found'.format(self.__name)) return _DYN_STORAGE[self.__name]