some string unifications

This commit is contained in:
Steffen Schaumburg 2011-03-19 02:13:26 +01:00
parent 5483e01693
commit b1387be3ce

View File

@ -170,7 +170,7 @@ class PacificPoker(HandHistoryConverter):
m = self.re_GameInfo.search(handText) m = self.re_GameInfo.search(handText)
if not m: if not m:
tmp = handText[0:120] tmp = handText[0:120]
log.error(_("determineGameType: Unable to recognise gametype from: '%s'") % tmp) log.error(_("Unable to recognise gametype from: '%s'") % tmp)
log.error(_("determineGameType: Raising FpdbParseError")) log.error(_("determineGameType: Raising FpdbParseError"))
raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp)
@ -201,7 +201,7 @@ class PacificPoker(HandHistoryConverter):
info['sb'] = self.Lim_Blinds[mg['BB']][0] info['sb'] = self.Lim_Blinds[mg['BB']][0]
info['bb'] = self.Lim_Blinds[mg['BB']][1] info['bb'] = self.Lim_Blinds[mg['BB']][1]
except KeyError: except KeyError:
log.error(_("determineGameType: Lim_Blinds has no lookup for '%s'" % mg['BB'])) log.error(_("Lim_Blinds has no lookup for '%s'") % mg['BB'])
log.error(_("determineGameType: Raising FpdbParseError")) log.error(_("determineGameType: Raising FpdbParseError"))
raise FpdbParseError(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) raise FpdbParseError(_("Lim_Blinds has no lookup for '%s'") % mg['BB'])
@ -212,8 +212,8 @@ class PacificPoker(HandHistoryConverter):
m = self.re_HandInfo.search(hand.handText,re.DOTALL) m = self.re_HandInfo.search(hand.handText,re.DOTALL)
m2 = self.re_GameInfo.search(hand.handText) m2 = self.re_GameInfo.search(hand.handText)
if m is None or m2 is None: if m is None or m2 is None:
log.error("Didn't match re_HandInfo") log.error(_("No match in readHandInfo: '%s'") % hand.handText[0:100])
raise FpdbParseError(_("No match in readHandInfo.")) raise FpdbParseError(_("No match in readHandInfo: '%s'") % hand.handText[0:100])
info.update(m.groupdict()) info.update(m.groupdict())
info.update(m2.groupdict()) info.update(m2.groupdict())
@ -255,7 +255,7 @@ class PacificPoker(HandHistoryConverter):
hand.buyinCurrency="PSFP" hand.buyinCurrency="PSFP"
else: else:
#FIXME: handle other currencies, FPP, play money #FIXME: handle other currencies, FPP, play money
raise FpdbParseError(_("Failed to detect currency: '%s'" % info[key])) raise FpdbParseError(_("Failed to detect currency. Hand ID: %s: '%s'") % (hand.handid, info[key]))
info['BIAMT'] = info['BIAMT'].strip(u'$€FPP') info['BIAMT'] = info['BIAMT'].strip(u'$€FPP')