Fixed hung up on incorrect hand history

This commit is contained in:
grindi 2009-08-06 19:15:55 +04:00
parent e0cbd674cb
commit 30ae9da2df

View File

@ -96,7 +96,10 @@ Otherwise, finish at eof.
handsList = self.allHandsAsList() handsList = self.allHandsAsList()
logging.info("Parsing %d hands" % len(handsList)) logging.info("Parsing %d hands" % len(handsList))
for handText in handsList: for handText in handsList:
self.processedHands.append(self.processHand(handText)) try:
self.processedHands.append(self.processHand(handText))
except Exception, e: # TODO: it's better to write something like HhcEception here
logging.error("Caught exception while parsing hand: %s" % str(e))
numHands= len(handsList) numHands= len(handsList)
endtime = time.time() endtime = time.time()
print "read %d hands in %.3f seconds" % (numHands, endtime - starttime) print "read %d hands in %.3f seconds" % (numHands, endtime - starttime)