* added a call to the import_parameter 'saveActions' in Hand.py, saving it's value in the variable Hand.saveActions
* added logic to Hand.import() so that it only calls db.storeHandsActions if saveActions is true * added logic to DetailedStats.getstats() so that it only calls assembleHandsActions() if saveActions is true
This commit is contained in:
+1
-16
@@ -23,13 +23,6 @@ import logging
|
||||
# logging has been set up in fpdb.py or HUD_main.py, use their settings:
|
||||
log = logging.getLogger("parser")
|
||||
|
||||
DEBUG = False
|
||||
|
||||
if DEBUG:
|
||||
import pprint
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
|
||||
|
||||
class DerivedStats():
|
||||
def __init__(self, hand):
|
||||
self.hand = hand
|
||||
@@ -93,17 +86,9 @@ class DerivedStats():
|
||||
self.assembleHands(self.hand)
|
||||
self.assembleHandsPlayers(self.hand)
|
||||
|
||||
if DEBUG:
|
||||
if self.hand.saveActions:
|
||||
self.assembleHandsActions(self.hand)
|
||||
|
||||
if DEBUG:
|
||||
#print "Hands:"
|
||||
#pp.pprint(self.hands)
|
||||
#print "HandsPlayers:"
|
||||
#pp.pprint(self.handsplayers)
|
||||
print "HandsActions:"
|
||||
pp.pprint(self.handsactions)
|
||||
|
||||
def getHands(self):
|
||||
return self.hands
|
||||
|
||||
|
||||
Reference in New Issue
Block a user