From 109ad292c0ce51ef0fa6f405791274c044af0215 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 19 Aug 2010 18:28:10 +0800 Subject: [PATCH] Hand: Add optional argument for printing test data And pass the argument on too Database --- pyfpdb/Hand.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 1d390378..c32f9f37 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -251,7 +251,7 @@ dealt whether they were seen in a 'dealt to' line db.commit() #end def prepInsert - def insert(self, db): + def insert(self, db, printtest = False): """ Function to insert Hand into database Should not commit, and do minimal selects. Callers may want to cache commits db: a connected Database object""" @@ -271,7 +271,7 @@ db: a connected Database object""" hh['seats'] = len(self.dbid_pids) self.dbid_hands = db.storeHand(hh) - db.storeHandsPlayers(self.dbid_hands, self.dbid_pids, self.stats.getHandsPlayers()) + db.storeHandsPlayers(self.dbid_hands, self.dbid_pids, self.stats.getHandsPlayers(), printdata = printtest) # TODO HandsActions - all actions for all players for all streets - self.actions # HudCache data can be generated from HandsActions (HandsPlayers?) else: