add warnings when get.sh fails

This commit is contained in:
forest 2021-02-17 21:15:23 -06:00
parent ea1eec7f92
commit 8d5e3d007d

View File

@ -87,12 +87,14 @@ class ShellScriptSpoke(VirtualizationInterface):
self.validate_completed_process(completedProcess)
lines = completedProcess.stdout.splitlines()
if len(lines) == 0:
current_app.logger.warning("shell_scripts/get.sh returned zero lines!")
return None
result_string = lines[0].decode("utf-8")
fields = result_string.split(" ")
if fields[0] != "true":
current_app.logger.warning(f"shell_scripts/get.sh was called for {id} which libvirt says does not exist.")
return None
if len(fields) < 2: