From 28576d70f83770d72fca78db6e30e424b013aff2 Mon Sep 17 00:00:00 2001 From: Eric Blade Date: Thu, 5 Aug 2010 04:07:37 -0400 Subject: [PATCH 1/3] switch "0.00%" on ffreq1 to NA, need to update all the other percents with that sometime too --- pyfpdb/Stats.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyfpdb/Stats.py b/pyfpdb/Stats.py index 74558da8..5faa1f59 100755 --- a/pyfpdb/Stats.py +++ b/pyfpdb/Stats.py @@ -711,10 +711,10 @@ def ffreq1(stat_dict, player): ) except: return (stat, - '%3.1f' % (0) + '%', - 'ff1=%3.1f' % (0) + '%', - 'ff_1=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + 'NA', + 'ff1=NA', + 'ff_1=NA', + '(0/0)', '% fold frequency flop/4th' ) From e49beb772400d7dc8dd714320d9421531af5cace Mon Sep 17 00:00:00 2001 From: Eric Blade Date: Thu, 5 Aug 2010 12:12:18 -0400 Subject: [PATCH 2/3] Hand: extreme terminal spam when something bad happens in readBlinds, stop crashing import HHC: set obs when failing to open a file (ie, you've stored a zip file in your handhistory folder), stop crashing import --- pyfpdb/Hand.py | 8 +++++++- pyfpdb/HandHistoryConverter.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index ee6d0bf2..ef5cdae4 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -683,9 +683,15 @@ class HoldemOmahaHand(Hand): hhc.readPlayerStacks(self) hhc.compilePlayerRegexs(self) hhc.markStreets(self) + if self.cancelled: return - hhc.readBlinds(self) + + try: hhc.readBlinds(self) + except: + print "*** Parse error reading blinds (check compilePlayerRegexs as a likely culprit)", self + return + hhc.readAntes(self) hhc.readButton(self) hhc.readHeroCards(self) diff --git a/pyfpdb/HandHistoryConverter.py b/pyfpdb/HandHistoryConverter.py index 8faf5dfb..a6f19aaa 100644 --- a/pyfpdb/HandHistoryConverter.py +++ b/pyfpdb/HandHistoryConverter.py @@ -441,6 +441,7 @@ or None if we fail to get the info """ pass else: print "unable to read file with any codec in list!", self.in_path + self.obs = None elif self.filetype == "xml": doc = xml.dom.minidom.parse(filename) self.doc = doc From 16cd5e750511e7ce9c485c0b1e88eda659c3f66f Mon Sep 17 00:00:00 2001 From: Eric Blade Date: Thu, 5 Aug 2010 12:31:37 -0400 Subject: [PATCH 3/3] update Everleaf config example, add bbper100/BBper100 stats to popup default, fix my last tweak to hhc --- pyfpdb/HUD_config.xml.example | 87 +++++++++++++++++----------------- pyfpdb/HandHistoryConverter.py | 2 +- 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/pyfpdb/HUD_config.xml.example b/pyfpdb/HUD_config.xml.example index e25a1ab7..016b0a4d 100644 --- a/pyfpdb/HUD_config.xml.example +++ b/pyfpdb/HUD_config.xml.example @@ -252,49 +252,46 @@ Left-Drag to Move" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + diff --git a/pyfpdb/HandHistoryConverter.py b/pyfpdb/HandHistoryConverter.py index a6f19aaa..37ba831f 100644 --- a/pyfpdb/HandHistoryConverter.py +++ b/pyfpdb/HandHistoryConverter.py @@ -441,7 +441,7 @@ or None if we fail to get the info """ pass else: print "unable to read file with any codec in list!", self.in_path - self.obs = None + self.obs = "" elif self.filetype == "xml": doc = xml.dom.minidom.parse(filename) self.doc = doc