From a3cab472b1cb069c925f8587c549fd81cafef2b0 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Wed, 3 Mar 2010 15:08:00 -0500 Subject: [PATCH 1/3] Clean up guessMaxSeats. --- pyfpdb/PartyPokerToFpdb.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/pyfpdb/PartyPokerToFpdb.py b/pyfpdb/PartyPokerToFpdb.py index 46c8776b..f83c8672 100755 --- a/pyfpdb/PartyPokerToFpdb.py +++ b/pyfpdb/PartyPokerToFpdb.py @@ -106,18 +106,12 @@ class PartyPoker(HandHistoryConverter): def guessMaxSeats(self, hand): """Return a guess at max_seats when not specified in HH.""" - try: - m = re_seats.search(hand.handText) - mo = m.groupdict() - mo = _mo['SEATS'] - return mo - except: - mo = self.maxOccSeat(hand) - if mo == 10: return mo - if mo == 2: return 2 - if mo <= 6: return 6 - # there are 9-max tables for cash and 10-max for tournaments - return 9 if hand.gametype['type']=='ring' else 10 + mo = self.maxOccSeat(hand) + if mo == 10: return mo + if mo == 2: return 2 + if mo <= 6: return 6 + # there are 9-max tables for cash and 10-max for tournaments + return 9 if hand.gametype['type']=='ring' else 10 def compilePlayerRegexs(self, hand): players = set([player[1] for player in hand.players]) From 519494878eb6843b53523b065639d7b2f19ba6ab Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Thu, 4 Mar 2010 11:50:03 -0500 Subject: [PATCH 2/3] Don't try to find out blinds for stud games. --- pyfpdb/PokerStarsToFpdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 946d5ea2..bf0e8427 100644 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -181,7 +181,7 @@ class PokerStars(HandHistoryConverter): else: info['type'] = 'tour' - if info['limitType'] == 'fl' and info['bb'] != None and info['type'] == 'ring': + if info['limitType'] == 'fl' and info['bb'] is not None and info['type'] == 'ring' and info['base'] != 'stud': info['sb'] = Lim_Blinds[mg['BB']][0] info['bb'] = Lim_Blinds[mg['BB']][1] From a698b2e16de7a477834449ae6be696c1aed0a535 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 4 Mar 2010 17:50:51 +0800 Subject: [PATCH 3/3] PlayerStats: Fix sorting in # Hands col Patch from Almer Visser. Using %d causes Gtk to order as a string rather than a number. Convert to %1.0f and issue disappears. --- pyfpdb/GuiPlayerStats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/GuiPlayerStats.py b/pyfpdb/GuiPlayerStats.py index 39c6c727..b856a5e2 100644 --- a/pyfpdb/GuiPlayerStats.py +++ b/pyfpdb/GuiPlayerStats.py @@ -92,7 +92,7 @@ class GuiPlayerStats (threading.Thread): , ["hand", False, "Hand", 0.0, "%s", "str"] # true not allowed for this line , ["plposition", False, "Posn", 1.0, "%s", "str"] # true not allowed for this line (set in code) , ["pname", False, "Name", 0.0, "%s", "str"] # true not allowed for this line (set in code) - , ["n", True, "Hds", 1.0, "%d", "str"] + , ["n", True, "Hds", 1.0, "%1.0f", "str"] , ["avgseats", False, "Seats", 1.0, "%3.1f", "str"] , ["vpip", True, "VPIP", 1.0, "%3.1f", "str"] , ["pfr", True, "PFR", 1.0, "%3.1f", "str"]