merge in latest ray changes, replace excessive exception handling with a couple of if blocks in get_default_colors - there were definite errors in there not getting cauhgt due to the exception handling

This commit is contained in:
eblade 2008-10-30 05:30:29 -04:00
parent 3f7347d8f6
commit 6eca3fdce7

View File

@ -364,18 +364,18 @@ class Config:
def get_default_colors(self, site = "PokerStars"): def get_default_colors(self, site = "PokerStars"):
colors = {} colors = {}
try: if self.supported_sites[site].hudopacity == "":
colors['hudopacity'] = float(self.supported_sites[site].hudopacity)
except:
colors['hudopacity'] = 0.90 colors['hudopacity'] = 0.90
try: else:
colors['hudbgcolor'] = float(self.supported_sites[site].hudbgcolor) colors['hudopacity'] = float(self.supported_sites[site].hudopacity)
except: if self.supported_sites[site].hudbgcolor == "":
colors['hudbgcolor'] = "#FFFFFF" colors['hudbgcolor'] = "#FFFFFF"
try: else:
colors['hudfgcolor'] = float(self.supported_sites[site].hudbgcolor) colors['hudbgcolor'] = self.supported_sites[site].hudbgcolor
except: if self.supported_sites[site].hudfgcolor == "":
colors['hudfgcolor'] = "#000000" colors['hudfgcolor'] = "#000000"
else:
colors['hudfgcolor'] = self.supported_sites[site].hudfgcolor
return colors return colors
def get_locations(self, site = "PokerStars", max = "8"): def get_locations(self, site = "PokerStars", max = "8"):