def __init__(self, name='', desc='', config=None):
assert config is not None, logging.critical(
"Board.__init__: config is None")
# Configuration object used to read / write config values.
self.config = config
self.c = Colors()
self._name = name.lower()
self._desc = desc
self.thread = 0 # The thread that the user is viewing.
self.path = os.path.join(self.config.root, "boards", self._name)
self.index_path = os.path.join(self.path, "index")
self.boardlist_path = self.config.boardlist_path
if self.add_board():
logging.info(
'Board "/%s/ - %s" added succesfully.', self._name, self._desc)
评论列表
文章目录