Added validation to blind detection

Included checks for any ring game hands if there's a blind could be
found and if either SB or BB detection fails then determineGameType will
return None. It's needed for handling some invalid ring hands (e.g.
table closed messages at the end of a HH file).

Signed-off-by: steffen123 <steffen@schaumburger.info>
This commit is contained in:
Erki Ferenc 2010-08-10 00:36:34 +02:00 committed by steffen123
parent a6d7f27f5b
commit c7e86513c7

View File

@ -219,8 +219,11 @@ class PartyPoker(HandHistoryConverter):
info['type'] = 'ring' info['type'] = 'ring'
if info['type'] == 'ring': if info['type'] == 'ring':
info['sb'] = m_sb.group('RINGSB') if (m_sb is None) or (m_bb is None):
info['bb'] = m_bb.group('RINGBB') return None
else:
info['sb'] = m_sb.group('RINGSB')
info['bb'] = m_bb.group('RINGBB')
info['currency'] = currencies[mg['CURRENCY']] info['currency'] = currencies[mg['CURRENCY']]
else: else:
info['sb'] = clearMoneyString(mg['SB']) info['sb'] = clearMoneyString(mg['SB'])