From b07a423d0fb1b6bfbdb851195097d6fda38bc20e Mon Sep 17 00:00:00 2001 From: "wu.zhihui" Date: Wed, 15 Mar 2017 13:00:25 +0800 Subject: correct a mistake for os.getenv() os.getenv returns a string not a boolean. Although you set environment variable 'CI_DEBUG=false', the cleanup will not be executed. Change-Id: I077b602069f026a4b9ef6019869ac6c29c401c21 Signed-off-by: wu.zhihui --- qtip/util/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtip/util/env.py b/qtip/util/env.py index d00320c4..ab9ffa7a 100644 --- a/qtip/util/env.py +++ b/qtip/util/env.py @@ -192,7 +192,7 @@ class AnsibleEnvSetup(object): def cleanup(self): CI_DEBUG = os.getenv('CI_DEBUG') - if CI_DEBUG: + if CI_DEBUG is not None and CI_DEBUG.lower() == 'true': logger.info("DEBUG Mode: please do cleanup by manual.") else: for ip in self.host_ip_list: -- cgit 1.2.3-korg