league.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:cslbot 作者: knyte 项目源码 文件源码
def _createBatch(self, batch):
        currentID = self._getBatchStartingID()
        for game in batch:
            try:
                self._addEntity(self.games,
                    {'ID': currentID, 'WarlightID': '', 'Created': '',
                     'Winners': '', 'Sides': game['Sides'], 'Vetos': 0,
                     'Vetoed': '', 'Finished': '',
                     'Template': game['Template']})
                self._makeGame(currentID)
                currentID += 1
            except (SheetErrors.DataError, SheetErrors.SheetError) as e:
                self.parent.log(("Failed to add game to sheet due to %s" %
                                 str(e)), self.name, error=True)
            except APIError as e:
                self.parent.log(("Failed to create game with ID %d" %
                                 (currentID)), self.name, error=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号