Пример #1
0
 def __init__(self):
     # load packages configuration
     self._packages = BaseConfigFile(CONFIG_PACKAGES)
     # load cache database
     self._cache = JsonDatabase()
     self._cache.load(CACHE_PACKAGES)
     # set cache
     if set(self._cache.keys()) != set(
         ("downstream", "compare", "upstream")):
         logging.debug("Invalid cache, purging it")
         self._cache.clear()
         self._cache["upstream"] = {}
         self._cache["downstream"] = {}
         self._cache["compare"] = {}