def setup_cache(self):
if not self.cache_path or not os.path.isfile(self.cache_path):
cache = {}
else:
yaml = YAML()
cache = yaml.load(open(self.cache_path, 'r'))
if 'ho_cookies' not in cache:
cache['ho_cookies'] = {}
if 'admin_channels' not in cache:
cache['admin_channels'] = {}
if 'joined_conversations' not in cache:
cache['joined_conversations'] = {}
return cache
评论列表
文章目录