Merge branch 'master' of git://git.assembla.com/fpdb

This commit is contained in:
Worros 2009-12-21 11:16:25 +08:00
commit 7b7865e794

View File

@ -1,4 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
# -*- coding: iso-8859-15 -*-
#Copyright 2008 Steffen Jobbagy-Felso #Copyright 2008 Steffen Jobbagy-Felso
#This program is free software: you can redistribute it and/or modify #This program is free software: you can redistribute it and/or modify
@ -538,6 +539,10 @@ def parseAnteLine(line, isTourney, names, antes):
#returns the buyin of a tourney in cents #returns the buyin of a tourney in cents
def parseBuyin(topline): def parseBuyin(topline):
pos1 = topline.find("$")+1 pos1 = topline.find("$")+1
if pos1 != 0:
pos2 = topline.find("+")
else:
pos1 = topline.find("")+3
pos2 = topline.find("+") pos2 = topline.find("+")
return float2int(topline[pos1:pos2]) return float2int(topline[pos1:pos2])
@ -636,8 +641,13 @@ def parseCashesAndSeatNos(lines):
#returns the buyin of a tourney in cents #returns the buyin of a tourney in cents
def parseFee(topline): def parseFee(topline):
pos1 = topline.find("$")+1 pos1 = topline.find("$")+1
if pos1 != 0:
pos1 = topline.find("$", pos1)+1 pos1 = topline.find("$", pos1)+1
pos2 = topline.find(" ", pos1) pos2 = topline.find(" ", pos1)
else:
pos1 = topline.find("")+3
pos1 = topline.find("", pos1)+3
pos2 = topline.find(" ", pos1)
return float2int(topline[pos1:pos2]) return float2int(topline[pos1:pos2])
#returns a datetime object with the starttime indicated in the given topline #returns a datetime object with the starttime indicated in the given topline