p55 - three bugfixes

fixed bug that it filtered sitouts in tourneys
fixed bug that it didnt handle if some joined (tourney) out of hand
fixed bug that it didnt handle : in player name
This commit is contained in:
steffen123 2008-08-18 07:43:05 +01:00
parent f6d596d2ed
commit b546868e10
4 changed files with 19 additions and 12 deletions

View File

@ -53,15 +53,13 @@ implement error file in importer
catch index error, type error, file not found error
use different colours according to classification.
add stud, razz and tourney back to imp/tv but with less seperate codepathes
add stud, razz back to imp/tv but with less seperate codepathes
move prepare-git.sh and create-release.sh to utils
offer not storing db password
change definition of bet to exclude bring in?
in tv, select from hud table using named fields rather than the current *
remove remains of mysql/myisam support.
tourney bug: sometimes truncuates position on store -> possibly indicates much bigger problem
tourney bug: fails recognisePlayer
tourney bug: fails with tuple error in recogniseplayerid
fix GUI's load profile
HUD
config wizard

View File

@ -370,7 +370,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self.delete_event)
self.window.connect("destroy", self.destroy)
self.window.set_title("Free Poker DB - version: alpha1+, p54")
self.window.set_title("Free Poker DB - version: alpha1+, p55")
self.window.set_border_width(1)
self.window.set_size_request(1020,400)
self.window.set_resizable(True)

View File

@ -93,8 +93,10 @@ def import_file_dict(options):
elif (cancelled or damaged):
partial+=1
else: #normal processing
isTourney=fpdb_simple.isTourney(hand[0])
if not isTourney:
fpdb_simple.filterAnteBlindFold(site,hand)
hand=fpdb_simple.filterCrap(site, hand)
hand=fpdb_simple.filterCrap(site, hand, isTourney)
try:
if (category=="holdem" or category=="omahahi" or category=="omahahilo" or category=="razz" or category=="studhi" or category=="studhilo"):

View File

@ -305,7 +305,7 @@ def filterAnteBlindFold(site,hand):
#end def filterAnteFold
#removes useless lines as well as trailing spaces
def filterCrap(site, hand):
def filterCrap(site, hand, isTourney):
#remove one trailing space at end of line
for i in range (len(hand)):
if (hand[i][-1]==' '):
@ -317,6 +317,8 @@ def filterCrap(site, hand):
for i in range (len(hand)):
if (hand[i].startswith("Board [")):
toRemove.append(hand[i])
elif (hand[i].find(" out of hand ")!=-1):
hand[i]=hand[i][:-56]
elif (hand[i]=="*** HOLE CARDS ***"):
toRemove.append(hand[i])
elif (hand[i].endswith("has been disconnected")):
@ -374,10 +376,6 @@ def filterCrap(site, hand):
toRemove.append(hand[i])
elif (hand[i].endswith("was removed from the table for failing to post")):
toRemove.append(hand[i])
elif (hand[i].endswith("is sitting out")):
toRemove.append(hand[i])
elif (hand[i].endswith(": sits out")):
toRemove.append(hand[i])
elif (hand[i].find("joins the table at seat ")!=-1):
toRemove.append(hand[i])
elif (hand[i].endswith(" sits down")):
@ -401,6 +399,15 @@ def filterCrap(site, hand):
toRemove.append(hand[i])
elif (hand[i].find(": ")!=-1 and site=="ftp" and hand[i].find("Seat ")==-1 and hand[i].find(": Table")==-1): #filter ftp chat
toRemove.append(hand[i])
if isTourney:
if (hand[i].endswith(" is sitting out") and (not hand[i].startswith("Seat "))):
toRemove.append(hand[i])
else:
if (hand[i].endswith(": sits out")):
toRemove.append(hand[i])
elif (hand[i].endswith(" is sitting out")):
toRemove.append(hand[i])
for i in range (len(toRemove)):
#print "removing in filterCr:",toRemove[i]
@ -733,7 +740,7 @@ def parseCashesAndSeatNos(lines, site):
cashes = []
seatNos = []
for i in range (len(lines)):
pos2=lines[i].rfind(":")
pos2=lines[i].find(":")
seatNos.append(int(lines[i][5:pos2]))
pos1=lines[i].rfind("($")+2