check PLATFORM_COLORS

if platform is missing from PLATFORM_COLORS then default to DEFAULT_COLOR.
This commit is contained in:
blacktwin
2017-07-21 10:31:29 -04:00
committed by GitHub
parent 85a06c62db
commit 657ea2f3e7

View File

@ -299,7 +299,11 @@ def draw_map(map_type, geo_dict, filename):
zord = 3 zord = 3
alph = 1 alph = 1
else: else:
if data['platform'] in PLATFORM_COLORS:
color = PLATFORM_COLORS[data['platform']] color = PLATFORM_COLORS[data['platform']]
else:
color = DEFAULT_COLOR
print('Platform: {} is missing from PLATFORM_COLORS. Using DEFAULT_COLOR.'.format(data['platform']))
marker = '.' marker = '.'
if data['play_count'] >= 100: if data['play_count'] >= 100:
markersize = (data['play_count'] * .1) markersize = (data['play_count'] * .1)