Merge pull request #932 from karolinavelkaja/stop_all_caches_refactor

cosmetic changes for exception logging in stop_all_caches()
This commit is contained in:
Robert Baldyga 2021-09-10 09:16:31 +02:00 committed by GitHub
commit 4b084ea082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,10 +180,11 @@ def stop_all_caches():
if "No caches running" in list_caches().stdout: if "No caches running" in list_caches().stdout:
return return
TestRun.LOGGER.info("Stop all caches") TestRun.LOGGER.info("Stop all caches")
casctl_stop() stop_output = casctl_stop()
output = list_caches() caches_output = list_caches()
if "No caches running" not in output.stdout: if "No caches running" not in caches_output.stdout:
raise CmdException("Error while stopping caches.", output) raise CmdException(f"Error while stopping caches. "
f"Listing caches: {caches_output}", stop_output)
def remove_all_detached_cores(): def remove_all_detached_cores():