From 215d5a74b2ca9a725d0f09ae679518a426980e53 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Wed, 10 Dec 2008 00:05:12 +0000 Subject: [PATCH] If the small blind is dead and it's folded round to big blind, no one collects a pot. Warning if we do not see 'collected' line. --- pyfpdb/EverleafToFpdb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 4a8d7d4f..de7823bf 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -209,10 +209,10 @@ class Everleaf(HandHistoryConverter): def readCollectPot(self,hand): m = self.rexx.collect_pot_re.search(hand.string) - #print m.groups() - #print m.group('PNAME') - #for collection in m: - hand.addCollectPot(player=m.group('PNAME'),pot=m.group('POT')) + if m is not None: + hand.addCollectPot(player=m.group('PNAME'),pot=m.group('POT')) + else: + print "WARNING: Unusual, no one collected; can happen if it's folded to big blind with a dead small blind." def getRake(self, hand): hand.rake = hand.totalpot * Decimal('0.05') # probably not quite right