Party: Fix tournament buyin parsing
This commit is contained in:
parent
d8220e0b2e
commit
ee5d2feba2
|
@ -330,13 +330,19 @@ class PartyPoker(HandHistoryConverter):
|
||||||
# FIXME: there is no such property in Hand class
|
# FIXME: there is no such property in Hand class
|
||||||
self.isSNG = True
|
self.isSNG = True
|
||||||
if key == 'BUYIN':
|
if key == 'BUYIN':
|
||||||
# FIXME: it's dirty hack T_T
|
if hand.tourNo != None:
|
||||||
# code below assumes that tournament rake is equal to zero
|
hand.buyin = 0
|
||||||
if info[key] == None:
|
hand.fee = 0
|
||||||
hand.buyin = '$0+$0'
|
hand.buyinCurrency = "FREE"
|
||||||
|
hand.isKO = False
|
||||||
|
if info[key].find("$")!=-1:
|
||||||
|
hand.buyinCurrency="USD"
|
||||||
|
elif info[key].find(u"€")!=-1:
|
||||||
|
hand.buyinCurrency="EUR"
|
||||||
else:
|
else:
|
||||||
cur = info[key][0] if info[key][0] not in '0123456789' else ''
|
raise FpdbParseError(_("Failed to detect currency. HID: %s: '%s'" % (hand.handid, info[key])))
|
||||||
hand.buyin = info[key] + '+%s0' % cur
|
info[key] = info[key].strip(u'$€')
|
||||||
|
hand.buyin = int(100*Decimal(info[key]))
|
||||||
if key == 'LEVEL':
|
if key == 'LEVEL':
|
||||||
hand.level = info[key]
|
hand.level = info[key]
|
||||||
if key == 'PLAY' and info['PLAY'] != 'Real':
|
if key == 'PLAY' and info['PLAY'] != 'Real':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user