json: Add methods to wait for cx, endp to be found.

This lets scripts wait until we are sure the system can handle
further work.

Ensure we print out error in case the URL processing logic
detects and error and plans to exit.
This commit is contained in:
Ben Greear
2020-08-05 15:25:22 -07:00
parent 960b87b61f
commit db4a5b7728
5 changed files with 138 additions and 18 deletions

View File

@@ -137,7 +137,7 @@ class LFRequest:
response_json_list_.append(j)
return responses[0]
except urllib.error.HTTPError as error:
if show_error:
if show_error or die_on_error_ or (error.code != 404):
print("----- LFRequest::jsonPost:138 HTTPError: --------------------------------------------")
print("<%s> HTTP %s: %s"%(request.get_full_url(), error.code, error.reason, ))