Пример #1
0
def addDynStorage(name, storage):
    if name not in _DYN_STORAGE:
        _DYN_STORAGE[name] = storage
    else:
        raise error('Storage "{0:>s}" is exists'.format(name))
Пример #2
0
 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]
Пример #3
0
 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
Пример #4
0
def addDynStorage(name, storage):
    if name not in _DYN_STORAGE:
        _DYN_STORAGE[name] = storage
    else:
        raise error('Storage "{0:>s}" is exists'.format(name))
Пример #5
0
 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]
Пример #6
0
 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