From b607cf75e815ba53559496ff0c6a5143a1a4167d Mon Sep 17 00:00:00 2001 From: Eduardo Sousa Date: Fri, 4 Oct 2019 17:06:14 +0100 Subject: [PATCH] Fixing stdout lookup for Juju 2.7 It was failling because when the code is 1, it didn't returned any Stdout, therefore it fails because of the missing key. --- zaza/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaza/model.py b/zaza/model.py index 1eadc18f6..3d1db8cdc 100644 --- a/zaza/model.py +++ b/zaza/model.py @@ -978,7 +978,7 @@ async def _check_service(): command, model_name=model_name, timeout=timeout) - response_size = len(out['Stdout'].strip()) + response_size = len(out.get('Stdout', '').strip()) if target_status == "running" and response_size == 0: return False elif target_status == "stopped" and response_size > 0: