Hand: will give you a proper message to the console if it can't figure out what your datetime passed to it is
This commit is contained in:
parent
891ed0295f
commit
6568281589
|
@ -584,8 +584,15 @@ Map the tuple self.gametype onto the pokerstars string describing it
|
||||||
else: # non-mixed cash games
|
else: # non-mixed cash games
|
||||||
gs = gs + " %s (%s) - " % (self.getGameTypeAsString(), self.getStakesAsString())
|
gs = gs + " %s (%s) - " % (self.getGameTypeAsString(), self.getStakesAsString())
|
||||||
|
|
||||||
return gs + datetime.datetime.strftime(self.starttime,'%Y/%m/%d %H:%M:%S ET')
|
try:
|
||||||
|
timestr = datetime.datetime.strftime(self.starttime, '%Y/%m/%d %H:%M:%S ET')
|
||||||
|
except TypeError:
|
||||||
|
print "*** ERROR - HAND: calling writeGameLine with unexpected STARTTIME value, expecting datetime.date object, received:", self.starttime
|
||||||
|
print "*** Make sure your HandHistoryConverter is setting hand.starttime properly!"
|
||||||
|
print "*** Game String:", gs
|
||||||
|
return gs
|
||||||
|
else:
|
||||||
|
return gs + timestr
|
||||||
|
|
||||||
def writeTableLine(self):
|
def writeTableLine(self):
|
||||||
table_string = "Table \'%s\' %s-max" % (self.tablename, self.maxseats)
|
table_string = "Table \'%s\' %s-max" % (self.tablename, self.maxseats)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user