From 539fded22d6c80bea0cedb60f35a55408236d2fe Mon Sep 17 00:00:00 2001 From: j3s Date: Sat, 16 May 2020 15:51:38 -0500 Subject: [PATCH] Correct comparison type, add more verbose error --- capsulflask/virt_model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/capsulflask/virt_model.py b/capsulflask/virt_model.py index e6b09e9..9d1ca1a 100644 --- a/capsulflask/virt_model.py +++ b/capsulflask/virt_model.py @@ -84,8 +84,9 @@ class ShellScriptVirtualization(VirtualizationInterface): return False lines = completedProcess.stdout.splitlines() - if not lines[len(lines)-1] == "yes": - current_app.logger.error("capacity-avaliable.sh exited 0 but did not return \"yes\" ") + output = lines[len(lines)-1] + 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 True