blackjack: fix exception in insurance command error path

This commit is contained in:
moneromooo 2015-02-12 15:38:02 +00:00
parent 4da435b9d2
commit 29dcb74ef3

View file

@ -719,7 +719,7 @@ def Insurance(link,cmd):
insurance_units = units / 2 insurance_units = units / 2
enough, reason = IsPlayerBalanceAtLeast(link,units + insurance_units) enough, reason = IsPlayerBalanceAtLeast(link,units + insurance_units)
if not enough: if not enough:
link.send("%s: you do not have enough %s in your account to insure with %s" % (link.user.nick,coinspecs.name,idx+1,AmountToString(insurance_units))) link.send("%s: you do not have enough %s in your account to insure with %s" % (link.user.nick,coinspecs.name,AmountToString(insurance_units)))
return return
if IsBlackjack(dealer_hand): if IsBlackjack(dealer_hand):
Lose(link,True) Lose(link,True)