From a3cab472b1cb069c925f8587c549fd81cafef2b0 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Wed, 3 Mar 2010 15:08:00 -0500 Subject: [PATCH] Clean up guessMaxSeats. --- pyfpdb/PartyPokerToFpdb.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/pyfpdb/PartyPokerToFpdb.py b/pyfpdb/PartyPokerToFpdb.py index 46c8776b..f83c8672 100755 --- a/pyfpdb/PartyPokerToFpdb.py +++ b/pyfpdb/PartyPokerToFpdb.py @@ -106,18 +106,12 @@ class PartyPoker(HandHistoryConverter): def guessMaxSeats(self, hand): """Return a guess at max_seats when not specified in HH.""" - try: - m = re_seats.search(hand.handText) - mo = m.groupdict() - mo = _mo['SEATS'] - return mo - except: - mo = self.maxOccSeat(hand) - if mo == 10: return mo - if mo == 2: return 2 - if mo <= 6: return 6 - # there are 9-max tables for cash and 10-max for tournaments - return 9 if hand.gametype['type']=='ring' else 10 + mo = self.maxOccSeat(hand) + if mo == 10: return mo + if mo == 2: return 2 + if mo <= 6: return 6 + # there are 9-max tables for cash and 10-max for tournaments + return 9 if hand.gametype['type']=='ring' else 10 def compilePlayerRegexs(self, hand): players = set([player[1] for player in hand.players])