From b559fcc2812b6a84ee43fa7dcb8e8287d66e1bf9 Mon Sep 17 00:00:00 2001 From: James Scott Date: Thu, 13 Dec 2012 23:17:19 -0500 Subject: [PATCH] Added some exception handling for the nextround method --- plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin.py b/plugin.py index 47736a5..da5a7bc 100644 --- a/plugin.py +++ b/plugin.py @@ -128,6 +128,7 @@ class Cah(callbacks.Plugin): self._msg(channel, "I need more players.") else: game.canStart = False + game.running = True game.game = Game(game.players, game.rounds) #start game logic self.nextround() @@ -149,8 +150,9 @@ class Cah(callbacks.Plugin): self._msg(channel, "The white cards have been PMed to the players, you have 60 seconds to choose.") #TODO: do we need a round flag? schedule.addEvent(self.endround, time.time() + 60, "round_%s" % channel) - except: + except Exception as e: #TODO: add no more round logic + print e pass