HHC will return without generating python errors if given an empty input, commented out echoing the input

This commit is contained in:
eblade 2009-02-19 16:56:37 -05:00
parent d2159b6430
commit 14cf64f81b

View File

@ -110,11 +110,14 @@ class HandHistoryConverter:
print "Cowardly refusing to continue after failed sanity check" print "Cowardly refusing to continue after failed sanity check"
return return
self.readFile(self.file) self.readFile(self.file)
if self.obs == "" or self.obs == None:
print "Did not read anything from file."
return
outfile = open(self.ofile, 'w') outfile = open(self.ofile, 'w')
self.gametype = self.determineGameType() self.gametype = self.determineGameType()
self.hands = self.splitFileIntoHands() self.hands = self.splitFileIntoHands()
for hand in self.hands: for hand in self.hands:
print "\nInput:\n"+hand.string # print "\nInput:\n"+hand.string
self.readHandInfo(hand) self.readHandInfo(hand)
self.readPlayerStacks(hand) self.readPlayerStacks(hand)
print "DEBUG stacks:", hand.stacks print "DEBUG stacks:", hand.stacks