From d4623a9c8d79a2bada400f67e0b72f63d42dde23 Mon Sep 17 00:00:00 2001 From: James Scott Date: Thu, 13 Dec 2012 23:14:22 -0500 Subject: [PATCH] getting rid of uneeded try catch block --- plugin.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/plugin.py b/plugin.py index 462908b..47736a5 100644 --- a/plugin.py +++ b/plugin.py @@ -138,24 +138,22 @@ class Cah(callbacks.Plugin): def nextround(self): channel = self.channel + game = self + cah = game.game try: - game = self - cah = game.game - try: - cah.nextround() - #Print Black Card to channel. - self._printBlackCard(self.channel) - for player in cah.players: - self._msgHandToPlayer(player) - 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: - #TODO: add no more round logic - pass + cah.nextround() + #Print Black Card to channel. + self._printBlackCard(self.channel) + for player in cah.players: + self._msgHandToPlayer(player) + 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: + #TODO: add no more round logic + pass + - except KeyError: - irc.reply("A Game is not running.") def card(self): channel = ircutils.toLower(msg.args[0])