removed unconditional exception handling + kwarg max should be int
This commit is contained in:
parent
14200c5a50
commit
2199d165f1
|
@ -769,15 +769,17 @@ class Config:
|
||||||
font_size = site.font_size
|
font_size = site.font_size
|
||||||
return font, font_size
|
return font, font_size
|
||||||
|
|
||||||
def get_locations(self, site = "PokerStars", max = "8"):
|
def get_locations(self, site_name="PokerStars", max=8):
|
||||||
|
site = self.supported_sites.get(site_name, None)
|
||||||
try:
|
if site is not None:
|
||||||
locations = self.supported_sites[site].layout[max].location
|
location = site.layout.get(max, None)
|
||||||
except:
|
if location is not None:
|
||||||
locations = ( ( 0, 0), (684, 61), (689, 239), (692, 346),
|
return location.location
|
||||||
|
return (
|
||||||
|
( 0, 0), (684, 61), (689, 239), (692, 346),
|
||||||
(586, 393), (421, 440), (267, 440), ( 0, 361),
|
(586, 393), (421, 440), (267, 440), ( 0, 361),
|
||||||
( 0, 280), (121, 280), ( 46, 30) )
|
( 0, 280), (121, 280), ( 46, 30)
|
||||||
return locations
|
)
|
||||||
|
|
||||||
def get_aux_locations(self, aux = "mucked", max = "9"):
|
def get_aux_locations(self, aux = "mucked", max = "9"):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user