aboutsummaryrefslogtreecommitdiffstats
path: root/qtip/util
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2017-03-15 13:00:25 +0800
committerzhihui wu <zhihui.wu2006+zte@gmail.com>2017-03-16 08:36:19 +0000
commitb07a423d0fb1b6bfbdb851195097d6fda38bc20e (patch)
treea8266f9f9541982e7a41ef4b61b7463de36077fb /qtip/util
parentb40b4b80ce06a1e2c96563e177df0e513c2187eb (diff)
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 <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'qtip/util')
-rw-r--r--qtip/util/env.py2
1 files changed, 1 insertions, 1 deletions
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: