treating aircraft data as alist

This commit is contained in:
Mark Bumiller 2022-12-07 18:59:39 -05:00 committed by GitHub
parent 4d44d58306
commit d6bb192163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -195,8 +195,8 @@ try:
for icao in planes:
plane = planes[icao]
plane_info = pull_rpdadsbx(icao)
if plane_info is not None:
data_indexed[icao.upper()] = plane_info['ac']
if plane_info:
data_indexed[icao.upper()] = plane_info['ac'][0]
if data_indexed[icao.upper()]:
plane.run_adsbx_v2(data_indexed[icao.upper()])
else:
@ -271,4 +271,4 @@ except Exception as e:
logging.error(str(traceback.format_exc()))
from defDiscord import sendDis
sendDis(str("Error Exiting: " + str(e) + f"Failed on ({obj.config_path}) https://globe.adsbexchange.com/?icao={key} "), main_config, main_config.get('DISCORD', 'ROLE_ID'), "crash_latest.log")
raise e
raise e