From 924e155b450a0081ab324a5137aafcbe03faf2d0 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 19 Aug 2010 18:23:26 +0800 Subject: [PATCH] Database: Add optional argument for pprinting the player data. --- pyfpdb/Database.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 9b1b962b..797c4e28 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1633,8 +1633,13 @@ class Database: return self.get_last_insert_id(c) # def storeHand - def storeHandsPlayers(self, hid, pids, pdata): + def storeHandsPlayers(self, hid, pids, pdata, printdata = False): #print "DEBUG: %s %s %s" %(hid, pids, pdata) + if printdata: + import pprint + pp = pprint.PrettyPrinter(indent=4) + pp.pprint(pdata) + inserts = [] for p in pdata: inserts.append( (hid,