support PS tourneys with euro buyin

This commit is contained in:
steffen123 2009-12-20 12:01:26 +00:00
parent d5de93da28
commit d5608fa7a7

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