From ce47fe3d18979b1d7323162ee2f0623531255bfd Mon Sep 17 00:00:00 2001 From: Jxck-S Date: Mon, 5 Oct 2020 12:34:22 -0400 Subject: [PATCH 1/3] Change to modern headless tag --- defSS.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defSS.py b/defSS.py index 189e4dc..5ae6fb8 100644 --- a/defSS.py +++ b/defSS.py @@ -9,7 +9,7 @@ from selenium import webdriver import time def getSS(icao): chrome_options = webdriver.ChromeOptions() - chrome_options.add_argument('--headless') + chrome_options.headless = True chrome_options.add_argument('window-size=800,800') #chrome_options.add_argument('--no-sandbox') # required when running as root user. otherwise you would get no sandbox errors. browser = webdriver.Chrome(options=chrome_options) From c8915cd6b7fcc9c86fb4a6595137ba1906be0b0f Mon Sep 17 00:00:00 2001 From: Jxck-S Date: Wed, 7 Oct 2020 16:31:51 -0400 Subject: [PATCH 2/3] Only check incosistency on loss --- planeClass.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/planeClass.py b/planeClass.py index 383b2a7..9bc46de 100644 --- a/planeClass.py +++ b/planeClass.py @@ -131,12 +131,14 @@ class Plane: print ("Longitude: ", self.longitude) print ("GEO Alitude Ft: ", self.geo_alt_ft) print(Style.RESET_ALL) - #Set Check for inconsistancy in data + #Set Check for inconsistancy in data if not self.last_recheck_needed: #Recheck needed if feeding state changes - if self.feeding != self.last_feeding: + if self.feeding == False and self.last_feeding: self.recheck_needed = True print("Recheck needed, feeding status changed") + else: + self.recheck_needed = False elif self.last_recheck_needed: self.recheck_needed = False @@ -148,9 +150,9 @@ class Plane: elif self.recheck_feeding != self.feeding: print("Data Feeding change was Inconsistent last data ignored") - self.recheck_feeding = self.feeding + self.recheck_feeding = self.feeding self.last_recheck_needed = self.recheck_needed - + if self.recheck_needed is False: #Check if below desire ft From 0fc4885452e929bdd3ba130eb98383aa916da671 Mon Sep 17 00:00:00 2001 From: Jxck-S Date: Sat, 10 Oct 2020 12:51:52 -0400 Subject: [PATCH 3/3] Change Connection Exceptions --- defADSBX.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defADSBX.py b/defADSBX.py index 1581ecf..0ee6f7c 100644 --- a/defADSBX.py +++ b/defADSBX.py @@ -21,7 +21,7 @@ def pullADSBX(planes): data = response.text data = json.loads(data) failed = False - except (requests.HTTPError, requests.ConnectionError, requests.Timeout, IncompleteRead) as error_message: + except (requests.HTTPError, requests.Timeout, IncompleteRead, ConnectionError, ConnectionResetError) as error_message: print("ADSBX Connection Error") print(error_message) failed = True