From c361992b13008237c7180fc8fe6d832f0e45edd3 Mon Sep 17 00:00:00 2001 From: Chaz Littlejohn Date: Wed, 30 Mar 2011 03:15:12 +0000 Subject: [PATCH 1/3] added \u20ac into the sym dict --- pyfpdb/WinamaxToFpdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/WinamaxToFpdb.py b/pyfpdb/WinamaxToFpdb.py index 65dbb1df..e3aafe4d 100644 --- a/pyfpdb/WinamaxToFpdb.py +++ b/pyfpdb/WinamaxToFpdb.py @@ -52,7 +52,7 @@ class Winamax(HandHistoryConverter): siteId = 14 # Needs to match id entry in Sites database mixes = { } # Legal mixed games - sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3"} # ADD Euro, Sterling, etc HERE + sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\xe2\x82\xac|\u20ac", "GBP": "\xa3"} # ADD Euro, Sterling, etc HERE substitutions = { 'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes 'LS' : u"\$|\xe2\x82\xac|\u20ac|" # legal currency symbols - Euro(cp1252, utf-8) From fc2b79a5e8a9853068bfe96129db7e1c8bf202f5 Mon Sep 17 00:00:00 2001 From: Chaz Littlejohn Date: Wed, 30 Mar 2011 03:18:36 +0000 Subject: [PATCH 2/3] tourneysPlayersIds is later updated by db.createOrUpdateTourneysPlayers and turned into a dict rather than a list so it makes sense to initialise as such --- pyfpdb/Hand.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 58fb433d..bbfd9273 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -102,7 +102,7 @@ class Hand(object): self.seating = [] self.players = [] self.posted = [] - self.tourneysPlayersIds = [] + self.tourneysPlayersIds = {} # Collections indexed by street names self.bets = {} From 6954ab1b62c577eb28e0c5cc8c1ba488484a0389 Mon Sep 17 00:00:00 2001 From: Chaz Littlejohn Date: Wed, 30 Mar 2011 03:49:13 +0000 Subject: [PATCH 3/3] changed the key in the hands stats dict from 'gameTypeId' back to 'gametypeId' --- pyfpdb/Database.py | 2 +- pyfpdb/Hand.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 5481d9b9..4131d4ff 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1855,7 +1855,7 @@ class Database: hbulk.append( [ hdata['tableName'], hdata['siteHandNo'], hdata['tourneyId'], - hdata['gameTypeId'], + hdata['gametypeId'], hdata['sessionId'], hdata['gameSessionId'], hdata['startTime'], diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index bbfd9273..f51c4074 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -277,7 +277,7 @@ dealt whether they were seen in a 'dealt to' line """ Function to insert Hand into database Should not commit, and do minimal selects. Callers may want to cache commits db: a connected Database object""" - self.hands['gameTypeId'] = self.dbid_gt + self.hands['gametypeId'] = self.dbid_gt self.hands['seats'] = len(self.dbid_pids) hbulk = db.storeHand(self.hands, hbulk, doinsert, printtest) return hbulk