Merge branch 'master' of git://git.assembla.com/fpdboz

This commit is contained in:
Ray
2009-08-08 09:29:41 -04:00
16 changed files with 155 additions and 170 deletions
+8 -2
View File
@@ -1,4 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#Copyright 2008 Carl Gherardi
#This program is free software: you can redistribute it and/or modify
@@ -95,9 +96,14 @@ Otherwise, finish at eof.
else:
handsList = self.allHandsAsList()
logging.info("Parsing %d hands" % len(handsList))
nBadHangs = 0
for handText in handsList:
self.processedHands.append(self.processHand(handText))
numHands= len(handsList)
try:
self.processedHands.append(self.processHand(handText))
except Exception, e: # TODO: it's better to replace it with s-t like HhcEception
nBadHangs += 1
logging.error("Caught exception while parsing hand: %s" % str(e))
numHands = len(handsList) - nBadHangs
endtime = time.time()
print "read %d hands in %.3f seconds" % (numHands, endtime - starttime)
if self.out_fh != sys.stdout: