From cfbf57dd1befdd5d46c422ef6ba77a266ae5d9a2 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Wed, 11 Mar 2009 14:33:07 +0000 Subject: [PATCH] if dont have site and BB in lookupLimit table, just halve them for sb,bb. Should work for higher limits almost always anyway, and there are a finite number of ulimits which we should already have in the table --- pyfpdb/Hand.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 8258e49d..b72ef9f1 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -329,7 +329,13 @@ Map the tuple self.gametype onto the pokerstars string describing it "4" : ("1", "2") } } - return betlist[self.sitename][self.bb] + try: + ret = betlist[self.sitename][self.bb] + except: + logging.warning("Don't know the small blind/big blind size for %s, big bet size %s." % (self.sitename, self.bb)) + ret = (Decimal(self.sb)/2,Decimal(self.bb)/2) + + return ret def writeHand(self, fh=sys.__stdout__):