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

@@ -196,7 +196,7 @@ class LFCliBase:
# use this inside the class to log a failure result
def _fail(self, message, print_=False):
self.test_results.append(self.fail_pref + message)
if print_:
if print_ or self.exit_on_fail:
print(self.fail_pref + message)
if self.exit_on_fail:
sys.exit(1)