diff --git a/py-json/LANforge/lfcli_base.py b/py-json/LANforge/lfcli_base.py index f0619d25..a0d2fdcf 100644 --- a/py-json/LANforge/lfcli_base.py +++ b/py-json/LANforge/lfcli_base.py @@ -365,8 +365,10 @@ class LFCliBase: if (fail_counter == 0) and (pass_counter > 0): return True return False - #use this function to + + def failed(self): + print(self.get_failed_result_list()) print("Test failed. Exiting now.") sys.exit(1) diff --git a/py-scripts/example_open_connection.py b/py-scripts/example_open_connection.py index 94c708d8..4b5a8c28 100755 --- a/py-scripts/example_open_connection.py +++ b/py-scripts/example_open_connection.py @@ -56,7 +56,6 @@ class IPv4Test(LFCliBase): self.passed() else: self._fail("Stations not able to acquire IP. Please check network input.") - print(self.get_failed_result_list()) self.failed() diff --git a/py-scripts/example_wep_connection.py b/py-scripts/example_wep_connection.py index 6c211281..08535344 100755 --- a/py-scripts/example_wep_connection.py +++ b/py-scripts/example_wep_connection.py @@ -57,7 +57,6 @@ class IPv4Test(LFCliBase): self.passed() else: self._fail("Stations not able to acquire IP. Please check network input.") - print(self.get_failed_result_list()) self.failed() def cleanup(self, sta_list): diff --git a/py-scripts/example_wpa2_connection.py b/py-scripts/example_wpa2_connection.py index 096f1dae..b48f70aa 100755 --- a/py-scripts/example_wpa2_connection.py +++ b/py-scripts/example_wpa2_connection.py @@ -57,9 +57,6 @@ class IPv4Test(LFCliBase): self.passed() else: self._fail("Stations not able to acquire IP. Please check network input.") - self - self._fail("Stations not able to acquire IP. Please check network input.") - print(self.get_failed_result_list()) self.failed() def cleanup(self, sta_list): diff --git a/py-scripts/example_wpa3_connection.py b/py-scripts/example_wpa3_connection.py index 6e663c17..77705e7c 100755 --- a/py-scripts/example_wpa3_connection.py +++ b/py-scripts/example_wpa3_connection.py @@ -57,7 +57,6 @@ class IPv4Test(LFCliBase): self.passed() else: self._fail("Stations not able to acquire IP. Please check network input.") - print(self.get_failed_result_list()) self.failed() diff --git a/py-scripts/example_wpa_connection.py b/py-scripts/example_wpa_connection.py index 85921c82..4fe7caab 100755 --- a/py-scripts/example_wpa_connection.py +++ b/py-scripts/example_wpa_connection.py @@ -58,7 +58,6 @@ class IPv4Test(LFCliBase): else: self._fail("Stations not able to acquire IP. Please check network input.") - print(self.get_failed_result_list()) self.failed()