Hand: extreme terminal spam when something bad happens in readBlinds, stop crashing import

HHC: set obs when failing to open a file (ie, you've stored a zip file in your handhistory folder), stop crashing import
This commit is contained in:
Eric Blade 2010-08-05 12:12:18 -04:00
parent 7486095069
commit e49beb7724
2 changed files with 8 additions and 1 deletions

View File

@ -683,9 +683,15 @@ class HoldemOmahaHand(Hand):
hhc.readPlayerStacks(self)
hhc.compilePlayerRegexs(self)
hhc.markStreets(self)
if self.cancelled:
return
hhc.readBlinds(self)
try: hhc.readBlinds(self)
except:
print "*** Parse error reading blinds (check compilePlayerRegexs as a likely culprit)", self
return
hhc.readAntes(self)
hhc.readButton(self)
hhc.readHeroCards(self)

View File

@ -441,6 +441,7 @@ or None if we fail to get the info """
pass
else:
print "unable to read file with any codec in list!", self.in_path
self.obs = None
elif self.filetype == "xml":
doc = xml.dom.minidom.parse(filename)
self.doc = doc