From fcd0ba3dd12a1c75be38e8e04b5f2e6d26b2c2c1 Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 16 Feb 2010 00:34:18 +0800 Subject: [PATCH] PokerStarsToFpdb: allow a second small blind to be posted If a player sits out a sb in a cash game they can post it after the button There is still an accounting error in the way we calculate the returned bet. --- pyfpdb/PokerStarsToFpdb.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 8ea594aa..39066b8e 100755 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -288,8 +288,13 @@ class PokerStars(HandHistoryConverter): def readBlinds(self, hand): try: - m = self.re_PostSB.search(hand.handText) - hand.addBlind(m.group('PNAME'), 'small blind', m.group('SB')) + count = 0 + for a in self.re_PostSB.finditer(hand.handText): + if count == 0: + hand.addBlind(a.group('PNAME'), 'small blind', a.group('SB')) + count = 1 + else: + hand.addAnte(a.group('PNAME'), a.group('SB')) except: # no small blind hand.addBlind(None, None, None) for a in self.re_PostBB.finditer(hand.handText):