Fix findHeroCards() for empty streets.
This commit is contained in:
parent
021b9934ea
commit
0e76c3a676
|
@ -299,6 +299,7 @@ follow : whether to tail -f the input"""
|
||||||
|
|
||||||
for street, text in hand.streets.iteritems():
|
for street, text in hand.streets.iteritems():
|
||||||
if street in ('PREFLOP', 'DEAL'): continue # already done these
|
if street in ('PREFLOP', 'DEAL'): continue # already done these
|
||||||
|
if hand.streets[street] == None: continue # don't regex a None
|
||||||
m = self.re_HeroCards.finditer(hand.streets[street])
|
m = self.re_HeroCards.finditer(hand.streets[street])
|
||||||
for found in m:
|
for found in m:
|
||||||
player = found.group('PNAME')
|
player = found.group('PNAME')
|
||||||
|
@ -398,7 +399,7 @@ follow : whether to tail -f the input"""
|
||||||
|
|
||||||
|
|
||||||
def readShowdownActions(self, hand):
|
def readShowdownActions(self, hand):
|
||||||
# TODO: pick up mucks also
|
# TODO: pick up mucks also??
|
||||||
for shows in self.re_ShowdownAction.finditer(hand.handText):
|
for shows in self.re_ShowdownAction.finditer(hand.handText):
|
||||||
cards = shows.group('CARDS').split(' ')
|
cards = shows.group('CARDS').split(' ')
|
||||||
hand.addShownCards(cards, shows.group('PNAME'))
|
hand.addShownCards(cards, shows.group('PNAME'))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user