Browse Source

Fix None user, was passing as string not NoneType

single
Jxck-S 4 years ago
parent
commit
9c58933084
  1. 2
      defOpenSky.py

2
defOpenSky.py

@ -4,7 +4,7 @@ def pullOpenSky(TRACK_PLANE):
config.read('config.ini')
from opensky_api import OpenSkyApi
planeData = None
opens_api = OpenSkyApi(config.get('OPENSKY', 'USERNAME'), config.get('OPENSKY', 'PASSWORD'))
opens_api = OpenSkyApi(username= None if config.get('OPENSKY', 'USERNAME').upper() == "NONE" else config.get('OPENSKY', 'USERNAME'), password= None if config.get('OPENSKY', 'PASSWORD').upper() == "NONE" else config.get('OPENSKY', 'PASSWORD').upper())
failed = False
try:
planeData = opens_api.get_states(time_secs=0, icao24=TRACK_PLANE.lower())

Loading…
Cancel
Save