Add logging for two areas, fix RAZZ v Razz issue
Add ERROR conditions for determineGameType failing, and raise a FpdbParseError in each case
This commit is contained in:
parent
6ba7621f2a
commit
3dd5f92a3c
|
@ -135,8 +135,10 @@ class PokerStars(HandHistoryConverter):
|
||||||
info = {}
|
info = {}
|
||||||
m = self.re_GameInfo.search(handText)
|
m = self.re_GameInfo.search(handText)
|
||||||
if not m:
|
if not m:
|
||||||
print "DEBUG: determineGameType(): did not match"
|
tmp = handText[0:100]
|
||||||
return None
|
log.error("determineGameType: Unable to recognise gametype from: '%s'" % tmp)
|
||||||
|
log.error("determineGameType: Raising FpdbParseError")
|
||||||
|
raise FpdbParseError
|
||||||
|
|
||||||
mg = m.groupdict()
|
mg = m.groupdict()
|
||||||
# translations from captured groups to fpdb info strings
|
# translations from captured groups to fpdb info strings
|
||||||
|
@ -154,7 +156,7 @@ class PokerStars(HandHistoryConverter):
|
||||||
'Omaha' : ('hold','omahahi'),
|
'Omaha' : ('hold','omahahi'),
|
||||||
'Omaha Hi/Lo' : ('hold','omahahilo'),
|
'Omaha Hi/Lo' : ('hold','omahahilo'),
|
||||||
'Razz' : ('stud','razz'),
|
'Razz' : ('stud','razz'),
|
||||||
'RAZZ' : ('stud','razz'),
|
'RAZZ' : ('stud','razz'),
|
||||||
'7 Card Stud' : ('stud','studhi'),
|
'7 Card Stud' : ('stud','studhi'),
|
||||||
'7 Card Stud Hi/Lo' : ('stud','studhilo'),
|
'7 Card Stud Hi/Lo' : ('stud','studhilo'),
|
||||||
'Badugi' : ('draw','badugi'),
|
'Badugi' : ('draw','badugi'),
|
||||||
|
@ -183,8 +185,13 @@ class PokerStars(HandHistoryConverter):
|
||||||
info['type'] = 'tour'
|
info['type'] = 'tour'
|
||||||
|
|
||||||
if info['limitType'] == 'fl' and info['bb'] is not None and info['type'] == 'ring' and info['base'] != 'stud':
|
if info['limitType'] == 'fl' and info['bb'] is not None and info['type'] == 'ring' and info['base'] != 'stud':
|
||||||
info['sb'] = Lim_Blinds[mg['BB']][0]
|
try:
|
||||||
info['bb'] = Lim_Blinds[mg['BB']][1]
|
info['sb'] = Lim_Blinds[mg['BB']][0]
|
||||||
|
info['bb'] = Lim_Blinds[mg['BB']][1]
|
||||||
|
except KeyError:
|
||||||
|
log.error("determineGameType: Lim_Blinds has no lookup for '%s'" % mg['BB'])
|
||||||
|
log.error("determineGameType: Raising FpdbParseError")
|
||||||
|
raise FpdbParseError
|
||||||
|
|
||||||
# NB: SB, BB must be interpreted as blinds or bets depending on limit type.
|
# NB: SB, BB must be interpreted as blinds or bets depending on limit type.
|
||||||
return info
|
return info
|
||||||
|
|
Loading…
Reference in New Issue
Block a user