Absolute: support Pot Limit and Fixed Limit ("Normal" as they call it)

Configuration: Only trap the thrown error when checking for existence of site default paths, if not found set path to a reasonable ERROR message instead of "default"
This commit is contained in:
Eric Blade 2009-08-16 04:22:22 -05:00
parent 116141b833
commit b26f4a09ce
2 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ class Absolute(HandHistoryConverter):
#Seat 6 - FETS63 ($0.75 in chips)
#Board [10s 5d Kh Qh 8c]
re_GameInfo = re.compile(ur"^Stage #([0-9]+): (?P<GAME>Holdem|) (?P<LIMIT>No Limit|) (?P<CURRENCY>\$| €|)(?P<BB>[0-9]*[.0-9]+)", re.MULTILINE)
re_GameInfo = re.compile(ur"^Stage #([0-9]+): (?P<GAME>Holdem|) (?P<LIMIT>No Limit|Pot Limit|Normal) (?P<CURRENCY>\$| €|)(?P<BB>[0-9]*[.0-9]+)", re.MULTILINE)
re_HandInfo = re.compile(ur"^Stage #(?P<HID>[0-9]+): .*(?P<DATETIME>\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d).*\nTable: (?P<TABLE>.*) \(Real Money\)", re.MULTILINE)
re_Button = re.compile(ur"Seat #(?P<BUTTON>[0-9]) is the ?[dead]* dealer$", re.MULTILINE) # TODO: that's not the right way to match for "dead" dealer is it?
re_PlayerInfo = re.compile(ur"^Seat (?P<SEAT>[0-9]) - (?P<PNAME>.*) \((?:\$| €|)(?P<CASH>[0-9]*[.0-9]+) in chips\)", re.MULTILINE)
@ -112,7 +112,7 @@ or None if we fail to get the info """
mg = m.groupdict()
# translations from captured groups to our info strings
limits = { 'No Limit':'nl', 'PL':'pl', '':'fl' }
limits = { 'No Limit':'nl', 'Pot Limit':'pl', 'Normal':'fl' }
games = { # base, category
"Holdem" : ('hold','holdem'),
'Omaha' : ('hold','omahahi'),

View File

@ -311,7 +311,7 @@ class Config:
try:
print "Reading configuration file %s\n" % (file)
doc = xml.dom.minidom.parse(file)
except:
except:
print "Error parsing %s. See error log file." % (file)
traceback.print_exc(file=sys.stderr)
print "press enter to continue"
@ -596,8 +596,8 @@ class Config:
path = os.path.expanduser(self.supported_sites[site].HH_path)
assert(os.path.isdir(path) or os.path.isfile(path)) # maybe it should try another site?
paths['hud-defaultPath'] = paths['bulkImport-defaultPath'] = path
except:
paths['hud-defaultPath'] = paths['bulkImport-defaultPath'] = "default"
except AssertionError:
paths['hud-defaultPath'] = paths['bulkImport-defaultPath'] = "** ERROR DEFAULT PATH IN CONFIG DOES NOT EXIST **"
return paths
def get_frames(self, site = "PokerStars"):