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)
评论列表
文章目录