p56 - various fixes to get FTP working again

fixed in prev commit: sometimes truncuates position on store in tourneys
This commit is contained in:
steffen123 2008-08-18 09:05:22 +01:00
parent b546868e10
commit 660530a166
4 changed files with 27 additions and 14 deletions

View File

@ -12,6 +12,7 @@ re-run existing regression tests
alpha3
======
ftp: read maxSeats
add sf.net logo to webpage
separate db table design version and last bugfix in importer
change tabledesign VALIGN
@ -56,10 +57,9 @@ use different colours according to classification.
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?
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
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+, p55")
self.window.set_title("Free Poker DB - version: alpha1+, p56")
self.window.set_border_width(1)
self.window.set_size_request(1020,400)
self.window.set_resizable(True)

View File

@ -90,11 +90,13 @@ def mainParser(db, cursor, site, category, hand):
elif (lineTypes[i]=="ante"):
fpdb_simple.parseAnteLine(hand[i], site, names, antes)
elif (lineTypes[i]=="table"):
result=fpdb_simple.parseTableLine(hand[i])
maxSeats=result['maxSeats']
tableName=result['tableName']
tableResult=fpdb_simple.parseTableLine(site, hand[i])
else:
raise fpdb_simple.FpdbError("unrecognised lineType:"+lineTypes[i])
if site=="ftp":
tableResult=fpdb_simple.parseTableLine(site, hand[0])
maxSeats=tableResult['maxSeats']
tableName=tableResult['tableName']
#part 5: final preparations, then call fpdb_save_to_db.saveHoldem with
# the arrays as they are - that file will fill them.

View File

@ -19,6 +19,9 @@
import datetime
PS=1
FTP=2
class DuplicateError(Exception):
def __init__(self, value):
self.value = value
@ -881,8 +884,9 @@ def parseSiteHandNo(topline):
return topline[pos1:pos2]
#end def parseSiteHandNo
def parseTableLine(line):
def parseTableLine(site, line):
"""returns a dictionary with maxSeats and tableName"""
if site=="ps":
pos1=line.find('\'')+1
pos2=line.find('\'', pos1)
#print "table:",line[pos1:pos2]
@ -890,6 +894,13 @@ def parseTableLine(line):
pos4=line.find("-max")
#print "seats:",line[pos3:pos4]
return {'maxSeats':int(line[pos3:pos4]), 'tableName':line[pos1:pos2]}
elif site=="ftp":
pos1=line.find("Table ")+6
pos2=line.find("-")-1
#print "table:",line[pos1:pos2]+"end"
return {'maxSeats':9, 'tableName':line[pos1:pos2]}
else:
raise FpdbError("invalid site ID")
#end def parseTableLine
#returns the hand no assigned by the poker site