p106 - fixed small blind reading

This commit is contained in:
steffen123 2008-09-26 13:01:57 +01:00
parent 6926306147
commit ce3187667c
2 changed files with 9 additions and 6 deletions

View File

@ -18,8 +18,8 @@
import os
import sys
errorfile = open('fpdb-error.log', 'w')
sys.stderr = errorfile
#errorfile = open('fpdb-error.log', 'w')
#sys.stderr = errorfile
import pygtk
pygtk.require('2.0')

View File

@ -1042,11 +1042,14 @@ def recogniseGametypeID(cursor, topline, smallBlindLine, site_id, category, isTo
if (limit_type=="fl"):
big_blind=small_bet
if smallBlindLine==topline:
raise fpdb_simple.FpdbError("invalid small blind line")
if base=="hold":
if smallBlindLine==topline:
raise FpdbError("invalid small blind line")
else:
pos=smallBlindLine.rfind("$")+1
small_blind=float2int(smallBlindLine[pos:])
else:
pos=smallBlindLine.rfind("$")+1
small_blind=float2int(smallBlindLine[pos:])
small_blind=0
cursor.execute("""INSERT INTO Gametypes
(siteId, type, base, category, limitType, hiLo, smallBlind, bigBlind, smallBet, bigBet)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, base, category, limit_type, hiLo, small_blind, big_blind, small_bet, big_bet))