forked from 3wordchant/capsul-flask
add warnings when get.sh fails
This commit is contained in:
parent
ea1eec7f92
commit
8d5e3d007d
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user