remove spurious window realize from popup_window as well
printEmailErrorMessage also writes a traceback to the stderr, so we can more easily figure out -what part- it failed in parsePositions will ignore a small blind if it appears to be coming from the same place as the big (does this mess with dead blinds? who knows)
This commit is contained in:
parent
274cecdc58
commit
1de34462e3
|
@ -440,7 +440,7 @@ class Popup_window:
|
|||
self.lab.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(stat_window.parent.colors['hudbgcolor']))
|
||||
self.lab.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse(stat_window.parent.colors['hudfgcolor']))
|
||||
|
||||
self.window.realize
|
||||
# self.window.realize()
|
||||
|
||||
# figure out the row, col address of the click that activated the popup
|
||||
row = 0
|
||||
|
|
|
@ -31,6 +31,7 @@ try:
|
|||
except:
|
||||
pass
|
||||
|
||||
import traceback
|
||||
import math
|
||||
import os
|
||||
import datetime
|
||||
|
@ -298,6 +299,7 @@ class Importer:
|
|||
|
||||
|
||||
def printEmailErrorMessage(self, errors, filename, line):
|
||||
traceback.print_exc(file=sys.stderr)
|
||||
print "Error No.",errors,", please send the hand causing this to steffen@sycamoretest.info so I can fix it."
|
||||
print "Filename:", filename
|
||||
print "Here is the first line so you can identify it. Please mention that the error was a ValueError:"
|
||||
|
|
|
@ -54,7 +54,8 @@ def checkPositions(positions):
|
|||
pass
|
||||
|
||||
### RHH modified to allow for "position 9" here (pos==9 is when you're a dead hand before the BB
|
||||
if (pos!="B" and pos!="S" and pos!=0 and pos!=1 and pos!=2 and pos!=3 and pos!=4 and pos!=5 and pos!=6 and pos!=7 and pos!=9):
|
||||
### eric - position 8 could be valid - if only one blind is posted, but there's still 10 people, ie a sitout is present, and the small is dead...
|
||||
if not (pos == "B" or pos == "S" or (pos >= 0 and pos <= 9)):
|
||||
raise FpdbError("invalid position found in checkPositions. i: "+str(i)+" position: "+str(pos))
|
||||
#end def fpdb_simple.checkPositions
|
||||
|
||||
|
@ -893,6 +894,11 @@ def parsePositions (hand, names):
|
|||
if (bb!=-1):
|
||||
bb=recognisePlayerNo(bb, names, "bet")
|
||||
|
||||
print "sb = ", sb, "bb = ", bb
|
||||
if bb == sb:
|
||||
sbExists = False
|
||||
sb = -1
|
||||
|
||||
#write blinds into array
|
||||
if (sbExists):
|
||||
positions[sb]="S"
|
||||
|
@ -928,6 +934,7 @@ def parsePositions (hand, names):
|
|||
print "parsePositions names:",names
|
||||
print "result:",positions
|
||||
raise FpdbError ("failed to read positions")
|
||||
print str(positions), "\n"
|
||||
return positions
|
||||
#end def parsePositions
|
||||
|
||||
|
@ -1676,7 +1683,7 @@ def generateHudCacheData(player_ids, base, category, action_types, allIns, actio
|
|||
hudDataPositions.append('C')
|
||||
elif pos>=2 and pos<=4:
|
||||
hudDataPositions.append('M')
|
||||
elif pos>=5 and pos<=7:
|
||||
elif pos>=5 and pos<=8:
|
||||
hudDataPositions.append('E')
|
||||
### RHH Added this elif to handle being a dead hand before the BB (pos==9)
|
||||
elif pos==9:
|
||||
|
|
Loading…
Reference in New Issue
Block a user