Correct comparison type, add more verbose error

This commit is contained in:
j3s 2020-05-16 15:51:38 -05:00
parent 7a6ba7675c
commit 539fded22d

View File

@ -84,8 +84,9 @@ class ShellScriptVirtualization(VirtualizationInterface):
return False return False
lines = completedProcess.stdout.splitlines() lines = completedProcess.stdout.splitlines()
if not lines[len(lines)-1] == "yes": output = lines[len(lines)-1]
current_app.logger.error("capacity-avaliable.sh exited 0 but did not return \"yes\" ") if not output == b"yes":
current_app.logger.error(f"capacity-avaliable.sh exited 0 and returned {output} but did not return \"yes\" ")
return False return False
return True return True