From d5608fa7a7d6e86447b037d4ed9b1a07ac467fde Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 20 Dec 2009 12:01:26 +0000 Subject: [PATCH] support PS tourneys with euro buyin --- pyfpdb/fpdb_simple.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index 1c22f6e6..5f0c6507 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: iso-8859-15 -*- #Copyright 2008 Steffen Jobbagy-Felso #This program is free software: you can redistribute it and/or modify @@ -538,7 +539,11 @@ def parseAnteLine(line, isTourney, names, antes): #returns the buyin of a tourney in cents def parseBuyin(topline): pos1 = topline.find("$")+1 - pos2 = topline.find("+") + if pos1 != 0: + pos2 = topline.find("+") + else: + pos1 = topline.find("€")+3 + pos2 = topline.find("+") return float2int(topline[pos1:pos2]) #parses a card line and changes the passed arrays accordingly @@ -635,9 +640,14 @@ def parseCashesAndSeatNos(lines): #returns the buyin of a tourney in cents def parseFee(topline): - pos1=topline.find("$")+1 - pos1=topline.find("$",pos1)+1 - pos2=topline.find(" ", pos1) + pos1 = topline.find("$")+1 + if pos1 != 0: + pos1 = topline.find("$", pos1)+1 + pos2 = topline.find(" ", pos1) + else: + pos1 = topline.find("€")+3 + pos1 = topline.find("€", pos1)+3 + pos2 = topline.find(" ", pos1) return float2int(topline[pos1:pos2]) #returns a datetime object with the starttime indicated in the given topline