From 6eca3fdce7b00d9efdec13102b22e882ffd24d5c Mon Sep 17 00:00:00 2001 From: eblade Date: Thu, 30 Oct 2008 05:30:29 -0400 Subject: [PATCH] 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 --- pyfpdb/Configuration.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 6e38d50f..ed90bf05 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -364,18 +364,18 @@ class Config: def get_default_colors(self, site = "PokerStars"): colors = {} - try: - colors['hudopacity'] = float(self.supported_sites[site].hudopacity) - except: + if self.supported_sites[site].hudopacity == "": colors['hudopacity'] = 0.90 - try: - colors['hudbgcolor'] = float(self.supported_sites[site].hudbgcolor) - except: + else: + colors['hudopacity'] = float(self.supported_sites[site].hudopacity) + if self.supported_sites[site].hudbgcolor == "": colors['hudbgcolor'] = "#FFFFFF" - try: - colors['hudfgcolor'] = float(self.supported_sites[site].hudbgcolor) - except: + else: + colors['hudbgcolor'] = self.supported_sites[site].hudbgcolor + if self.supported_sites[site].hudfgcolor == "": colors['hudfgcolor'] = "#000000" + else: + colors['hudfgcolor'] = self.supported_sites[site].hudfgcolor return colors def get_locations(self, site = "PokerStars", max = "8"):