Database: Add optional argument for pprinting the player data.

This commit is contained in:
Worros 2010-08-19 18:23:26 +08:00
parent 4f854c5c35
commit 924e155b45

View File

@ -1633,8 +1633,13 @@ class Database:
return self.get_last_insert_id(c) return self.get_last_insert_id(c)
# def storeHand # def storeHand
def storeHandsPlayers(self, hid, pids, pdata): def storeHandsPlayers(self, hid, pids, pdata, printdata = False):
#print "DEBUG: %s %s %s" %(hid, pids, pdata) #print "DEBUG: %s %s %s" %(hid, pids, pdata)
if printdata:
import pprint
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(pdata)
inserts = [] inserts = []
for p in pdata: for p in pdata:
inserts.append( (hid, inserts.append( (hid,