From e11e66c3e67b6004e33a67575299496cc2019ae4 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 2 Mar 2011 16:01:55 +0800 Subject: [PATCH] FTP: Minor updates. Was sent an old file that has 'Omaha' instead of 'Omaha Hi' in the gametype line. Was also sent a hand history that contain no player stack information at all. --- pyfpdb/FulltiltToFpdb.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 20980de1..b63cec83 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -74,7 +74,7 @@ class Fulltilt(HandHistoryConverter): (Ante\s\$?(?P[%(NUM)s]+)\s)?-\s [%(LS)s]?(?P[%(NUM)s]+\sCap\s)? (?P(No\sLimit|Pot\sLimit|Limit))?\s - (?P(Hold\'em|Omaha\sHi|Omaha\sH/L|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi|2-7\sTriple\sDraw|5\sCard\sDraw|Badugi)) + (?P(Hold\'em|Omaha\sHi|Omaha\sH/L|Omaha|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi|2-7\sTriple\sDraw|5\sCard\sDraw|Badugi)) ''' % substitutions, re.VERBOSE) re_SplitHands = re.compile(r"\n\n\n+") re_TailSplitHands = re.compile(r"(\n\n+)") @@ -114,7 +114,7 @@ class Fulltilt(HandHistoryConverter): (\((?PTurbo)\)\s)? \((?P\d+)\)\s ((?PMatch\s\d)\s)? - (?P(Hold\'em|Omaha\sHi|Omaha\sH/L|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi))\s + (?P(Hold\'em|Omaha\sHi|Omaha\sH/L|Omaha|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi))\s (\((?PTurbo)\)\s)? (?P(No\sLimit|Pot\sLimit|Limit))? ''' % substitutions, re.VERBOSE) @@ -218,6 +218,7 @@ class Fulltilt(HandHistoryConverter): games = { # base, category "Hold'em" : ('hold','holdem'), 'Omaha Hi' : ('hold','omahahi'), + 'Omaha' : ('hold','omahahi'), 'Omaha H/L' : ('hold','omahahilo'), 'Razz' : ('stud','razz'), 'Stud Hi' : ('stud','studhi'), @@ -362,6 +363,10 @@ class Fulltilt(HandHistoryConverter): seat, stack = plist[a] hand.addPlayer(seat, a, stack) + if plist == {}: + #No players! The hand is either missing stacks or everyone is sitting out + raise FpdbParseError(_("FTP: readPlayerStacks: No players detected (hand #%s)") % hand.handid) + def markStreets(self, hand):