From daeee37b6b04017a7dff151b8b63f7102affc7cd Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Sat, 27 Feb 2010 13:56:19 +0000 Subject: [PATCH 1/3] default dbname option is overriding 'default=true' selection in config file --- pyfpdb/Options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/Options.py b/pyfpdb/Options.py index 6570dbe4..bda28259 100644 --- a/pyfpdb/Options.py +++ b/pyfpdb/Options.py @@ -27,7 +27,7 @@ def fpdb_options(): action="store_true", help="If passed error output will go to the console rather than .") parser.add_option("-d", "--databaseName", - dest="dbname", default="fpdb", + dest="dbname", help="Overrides the default database name") parser.add_option("-c", "--configFile", dest="config", default=None, From 4ed82b1f183d192ed6544ff890cbb9d600305afb Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Sat, 27 Feb 2010 15:47:24 +0000 Subject: [PATCH 2/3] comment out DEBUG print --- pyfpdb/Hand.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 56a11063..e9626522 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -1449,7 +1449,7 @@ class Pot(object): # Return any uncalled bet. committed = sorted([ (v,k) for (k,v) in self.committed.items()]) - print "DEBUG: committed: %s" % committed + #print "DEBUG: committed: %s" % committed #ERROR below. lastbet is correct in most cases, but wrong when # additional money is committed to the pot in cash games # due to an additional sb being posted. (Speculate that From 6a6d1b1b2c8ffd6e2352db726b9322ba2974cfed Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Sat, 27 Feb 2010 18:41:30 +0000 Subject: [PATCH 3/3] fix 3bet stat (was being set to false if someone else 4bet) --- pyfpdb/Database.py | 4 ---- pyfpdb/DerivedStats.py | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index d0fe733b..f51ce5f5 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -917,7 +917,6 @@ class Database: print "warning: constraint %s_%s_fkey not dropped: %s, continuing ..." \ % (fk['fktab'],fk['fkcol'], str(sys.exc_value).rstrip('\n')) else: - print "Only MySQL and Postgres supported so far" return -1 for idx in self.indexes[self.backend]: @@ -952,7 +951,6 @@ class Database: print "warning: index %s_%s_idx not dropped %s, continuing ..." \ % (idx['tab'],idx['col'], str(sys.exc_value).rstrip('\n')) else: - print "Error: Only MySQL and Postgres supported so far" return -1 if self.backend == self.PGSQL: @@ -1007,7 +1005,6 @@ class Database: except: print " create fk failed: " + str(sys.exc_info()) else: - print "Only MySQL and Postgres supported so far" return -1 for idx in self.indexes[self.backend]: @@ -1029,7 +1026,6 @@ class Database: except: print " create index failed: " + str(sys.exc_info()) else: - print "Only MySQL and Postgres supported so far" return -1 if self.backend == self.PGSQL: diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index dddbec8b..b13e7463 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -345,9 +345,9 @@ class DerivedStats(): for action in hand.actions[hand.actionStreets[1]]: # FIXME: fill other(3|4)BStreet0 - i have no idea what does it mean pname, aggr = action[0], action[1] in ('raises', 'bets') - self.handsplayers[pname]['street0_3BChance'] = bet_level == 2 + self.handsplayers[pname]['street0_3BChance'] = self.handsplayers[pname]['street0_3BChance'] or bet_level == 2 self.handsplayers[pname]['street0_4BChance'] = bet_level == 3 - self.handsplayers[pname]['street0_3BDone'] = aggr and (self.handsplayers[pname]['street0_3BChance']) + self.handsplayers[pname]['street0_3BDone'] = self.handsplayers[pname]['street0_3BDone'] or (aggr and self.handsplayers[pname]['street0_3BChance']) self.handsplayers[pname]['street0_4BDone'] = aggr and (self.handsplayers[pname]['street0_4BChance']) if aggr: bet_level += 1