FTP: Adjust SplitHands regex for 2 blank lines or more
Also add FpdbParseError() throe if GameInfo regex fails to match
This commit is contained in:
parent
14bd767603
commit
14ac685e30
|
@ -61,7 +61,7 @@ class Fulltilt(HandHistoryConverter):
|
||||||
(?P<LIMIT>(No\sLimit|Pot\sLimit|Limit))?\s
|
(?P<LIMIT>(No\sLimit|Pot\sLimit|Limit))?\s
|
||||||
(?P<GAME>(Hold\'em|Omaha\sHi|Omaha\sH/L|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi))
|
(?P<GAME>(Hold\'em|Omaha\sHi|Omaha\sH/L|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi))
|
||||||
''' % substitutions, re.VERBOSE)
|
''' % substitutions, re.VERBOSE)
|
||||||
re_SplitHands = re.compile(r"\n\n+")
|
re_SplitHands = re.compile(r"\n\n\n+")
|
||||||
re_TailSplitHands = re.compile(r"(\n\n+)")
|
re_TailSplitHands = re.compile(r"(\n\n+)")
|
||||||
re_HandInfo = re.compile(r'''.*\#(?P<HID>[0-9]+):\s
|
re_HandInfo = re.compile(r'''.*\#(?P<HID>[0-9]+):\s
|
||||||
(?:(?P<TOURNAMENT>.+)\s\((?P<TOURNO>\d+)\),\s)?
|
(?:(?P<TOURNAMENT>.+)\s\((?P<TOURNO>\d+)\),\s)?
|
||||||
|
@ -186,7 +186,10 @@ class Fulltilt(HandHistoryConverter):
|
||||||
|
|
||||||
m = self.re_GameInfo.search(handText)
|
m = self.re_GameInfo.search(handText)
|
||||||
if not m:
|
if not m:
|
||||||
return None
|
tmp = handText[0:100]
|
||||||
|
log.error(_("determineGameType: Unable to recognise gametype from: '%s'") % tmp)
|
||||||
|
log.error(_("determineGameType: Raising FpdbParseError"))
|
||||||
|
raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp)
|
||||||
mg = m.groupdict()
|
mg = m.groupdict()
|
||||||
|
|
||||||
# translations from captured groups to our info strings
|
# translations from captured groups to our info strings
|
||||||
|
|
Loading…
Reference in New Issue
Block a user