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:
		
							parent
							
								
									f6d596d2ed
								
							
						
					
					
						commit
						b546868e10
					
				| 
						 | 
					@ -53,15 +53,13 @@ implement error file in importer
 | 
				
			||||||
catch index error, type error, file not found error
 | 
					catch index error, type error, file not found error
 | 
				
			||||||
use different colours according to classification.
 | 
					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
 | 
					move prepare-git.sh and create-release.sh to utils
 | 
				
			||||||
offer not storing db password
 | 
					offer not storing db password
 | 
				
			||||||
change definition of bet to exclude bring in?
 | 
					change definition of bet to exclude bring in?
 | 
				
			||||||
in tv, select from hud table using named fields rather than the current *
 | 
					in tv, select from hud table using named fields rather than the current *
 | 
				
			||||||
remove remains of mysql/myisam support.
 | 
					remove remains of mysql/myisam support.
 | 
				
			||||||
tourney bug: sometimes truncuates position on store -> possibly indicates much bigger problem
 | 
					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
 | 
					fix GUI's load profile
 | 
				
			||||||
HUD
 | 
					HUD
 | 
				
			||||||
config wizard
 | 
					config wizard
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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 = gtk.Window(gtk.WINDOW_TOPLEVEL)
 | 
				
			||||||
		self.window.connect("delete_event", self.delete_event)
 | 
							self.window.connect("delete_event", self.delete_event)
 | 
				
			||||||
		self.window.connect("destroy", self.destroy)
 | 
							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_border_width(1)
 | 
				
			||||||
		self.window.set_size_request(1020,400)
 | 
							self.window.set_size_request(1020,400)
 | 
				
			||||||
		self.window.set_resizable(True)
 | 
							self.window.set_resizable(True)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -93,8 +93,10 @@ def import_file_dict(options):
 | 
				
			||||||
				elif (cancelled or damaged):
 | 
									elif (cancelled or damaged):
 | 
				
			||||||
					partial+=1
 | 
										partial+=1
 | 
				
			||||||
				else: #normal processing
 | 
									else: #normal processing
 | 
				
			||||||
 | 
										isTourney=fpdb_simple.isTourney(hand[0])
 | 
				
			||||||
 | 
										if not isTourney:
 | 
				
			||||||
						fpdb_simple.filterAnteBlindFold(site,hand)
 | 
											fpdb_simple.filterAnteBlindFold(site,hand)
 | 
				
			||||||
					hand=fpdb_simple.filterCrap(site, hand)
 | 
										hand=fpdb_simple.filterCrap(site, hand, isTourney)
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
					try:
 | 
										try:
 | 
				
			||||||
						if (category=="holdem" or category=="omahahi" or category=="omahahilo" or category=="razz" or category=="studhi" or category=="studhilo"):
 | 
											if (category=="holdem" or category=="omahahi" or category=="omahahilo" or category=="razz" or category=="studhi" or category=="studhilo"):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -305,7 +305,7 @@ def filterAnteBlindFold(site,hand):
 | 
				
			||||||
#end def filterAnteFold
 | 
					#end def filterAnteFold
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#removes useless lines as well as trailing spaces
 | 
					#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
 | 
						#remove one trailing space at end of line
 | 
				
			||||||
	for i in range (len(hand)):
 | 
						for i in range (len(hand)):
 | 
				
			||||||
		if (hand[i][-1]==' '):
 | 
							if (hand[i][-1]==' '):
 | 
				
			||||||
| 
						 | 
					@ -317,6 +317,8 @@ def filterCrap(site, hand):
 | 
				
			||||||
	for i in range (len(hand)):
 | 
						for i in range (len(hand)):
 | 
				
			||||||
		if (hand[i].startswith("Board [")):
 | 
							if (hand[i].startswith("Board [")):
 | 
				
			||||||
			toRemove.append(hand[i])
 | 
								toRemove.append(hand[i])
 | 
				
			||||||
 | 
							elif (hand[i].find(" out of hand ")!=-1):
 | 
				
			||||||
 | 
								hand[i]=hand[i][:-56]
 | 
				
			||||||
		elif (hand[i]=="*** HOLE CARDS ***"):
 | 
							elif (hand[i]=="*** HOLE CARDS ***"):
 | 
				
			||||||
			toRemove.append(hand[i])
 | 
								toRemove.append(hand[i])
 | 
				
			||||||
		elif (hand[i].endswith("has been disconnected")):
 | 
							elif (hand[i].endswith("has been disconnected")):
 | 
				
			||||||
| 
						 | 
					@ -374,10 +376,6 @@ def filterCrap(site, hand):
 | 
				
			||||||
			toRemove.append(hand[i])
 | 
								toRemove.append(hand[i])
 | 
				
			||||||
		elif (hand[i].endswith("was removed from the table for failing to post")):
 | 
							elif (hand[i].endswith("was removed from the table for failing to post")):
 | 
				
			||||||
			toRemove.append(hand[i])
 | 
								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):
 | 
							elif (hand[i].find("joins the table at seat ")!=-1):
 | 
				
			||||||
			toRemove.append(hand[i])
 | 
								toRemove.append(hand[i])
 | 
				
			||||||
		elif (hand[i].endswith(" sits down")):
 | 
							elif (hand[i].endswith(" sits down")):
 | 
				
			||||||
| 
						 | 
					@ -401,6 +399,15 @@ def filterCrap(site, hand):
 | 
				
			||||||
			toRemove.append(hand[i])
 | 
								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
 | 
							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])
 | 
								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)):
 | 
						for i in range (len(toRemove)):
 | 
				
			||||||
		#print "removing in filterCr:",toRemove[i]
 | 
							#print "removing in filterCr:",toRemove[i]
 | 
				
			||||||
| 
						 | 
					@ -733,7 +740,7 @@ def parseCashesAndSeatNos(lines, site):
 | 
				
			||||||
	cashes = []
 | 
						cashes = []
 | 
				
			||||||
	seatNos = []
 | 
						seatNos = []
 | 
				
			||||||
	for i in range (len(lines)):
 | 
						for i in range (len(lines)):
 | 
				
			||||||
		pos2=lines[i].rfind(":")
 | 
							pos2=lines[i].find(":")
 | 
				
			||||||
		seatNos.append(int(lines[i][5:pos2]))
 | 
							seatNos.append(int(lines[i][5:pos2]))
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		pos1=lines[i].rfind("($")+2
 | 
							pos1=lines[i].rfind("($")+2
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user