From 0ecd19fbdf172af1ddbb4f325ea8fcdaf959e4bc Mon Sep 17 00:00:00 2001 From: steffen123 Date: Wed, 7 Jul 2010 08:12:10 +0200 Subject: [PATCH] change PSS to give None for *Count --- pyfpdb/PokerStarsSummary.py | 2 +- pyfpdb/TourneySummary.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pyfpdb/PokerStarsSummary.py b/pyfpdb/PokerStarsSummary.py index f3eea8da..1f8042af 100644 --- a/pyfpdb/PokerStarsSummary.py +++ b/pyfpdb/PokerStarsSummary.py @@ -62,6 +62,6 @@ class PokerStarsSummary(TourneySummary): else: winnings=0 - self.addPlayer(rank, name, winnings, "USD", -1, -1, -1)#TODO: currency, ko/addon/rebuy count -> need examples! + self.addPlayer(rank, name, winnings, "USD", None, None, None)#TODO: currency, ko/addon/rebuy count -> need examples! #end def parseSummary #end class PokerStarsSummary diff --git a/pyfpdb/TourneySummary.py b/pyfpdb/TourneySummary.py index ff864642..20d68c4a 100644 --- a/pyfpdb/TourneySummary.py +++ b/pyfpdb/TourneySummary.py @@ -217,10 +217,13 @@ winnings (decimal) the money the player ended the tourney with (can be 0, or self.ranks.update( { name : Decimal(rank) } ) self.winnings.update( { name : Decimal(winnings) } ) self.winningsCurrency.update( { name : winningsCurrency } ) - self.rebuyCounts.update( {name: Decimal(rebuyCount) } ) - self.addOnCounts.update( {name: Decimal(addOnCount) } ) - self.koCounts.update( {name : Decimal(koCount) } ) - + if rebuyCount: + self.rebuyCounts.update( {name: Decimal(rebuyCount) } ) + if addOnCount: + self.addOnCounts.update( {name: Decimal(addOnCount) } ) + if koCount: + self.koCounts.update( {name : Decimal(koCount) } ) + #end def addPlayer def incrementPlayerWinnings(self, name, additionnalWinnings): log.debug("incrementPlayerWinnings: name : '%s' - Add Winnings (%s)" % (name, additionnalWinnings))