HHC: Raise exception when game isn't supported.
This commit is contained in:
parent
d605f89564
commit
3759751fe4
|
@ -289,6 +289,7 @@ which it expects to find at self.re_TailSplitHands -- see for e.g. Everleaf.py.
|
||||||
base = gametype['base']
|
base = gametype['base']
|
||||||
limit = gametype['limitType']
|
limit = gametype['limitType']
|
||||||
l = [type] + [base] + [limit]
|
l = [type] + [base] + [limit]
|
||||||
|
|
||||||
if l in self.readSupportedGames():
|
if l in self.readSupportedGames():
|
||||||
if gametype['base'] == 'hold':
|
if gametype['base'] == 'hold':
|
||||||
log.debug("hand = Hand.HoldemOmahaHand(self, self.sitename, gametype, handtext)")
|
log.debug("hand = Hand.HoldemOmahaHand(self, self.sitename, gametype, handtext)")
|
||||||
|
@ -299,14 +300,14 @@ which it expects to find at self.re_TailSplitHands -- see for e.g. Everleaf.py.
|
||||||
hand = Hand.DrawHand(self.config, self, self.sitename, gametype, handText)
|
hand = Hand.DrawHand(self.config, self, self.sitename, gametype, handText)
|
||||||
else:
|
else:
|
||||||
log.info(_("Unsupported game type: %s" % gametype))
|
log.info(_("Unsupported game type: %s" % gametype))
|
||||||
|
raise FpdbParseError(_("Unsupported game type: %s" % gametype))
|
||||||
|
|
||||||
if hand:
|
if hand:
|
||||||
#hand.writeHand(self.out_fh)
|
#hand.writeHand(self.out_fh)
|
||||||
return hand
|
return hand
|
||||||
else:
|
else:
|
||||||
log.info(_("Unsupported game type: %s" % gametype))
|
log.error(_("Unsupported game type: %s" % gametype))
|
||||||
# TODO: pity we don't know the HID at this stage. Log the entire hand?
|
# TODO: pity we don't know the HID at this stage. Log the entire hand?
|
||||||
# From the log we can deduce that it is the hand after the one before :)
|
|
||||||
|
|
||||||
|
|
||||||
# These functions are parse actions that may be overridden by the inheriting class
|
# These functions are parse actions that may be overridden by the inheriting class
|
||||||
|
|
Loading…
Reference in New Issue
Block a user