diff options
author | wu.zhihui <wu.zhihui1@zte.com.cn> | 2017-03-15 13:00:25 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-03-21 09:10:16 +0000 |
commit | 605b4c00a3253f9d4dee97848fee7ae7f50797a8 (patch) | |
tree | de8c364f4db0f90296f4b0dfc7b228bc9984031d /qtip/util/env.py | |
parent | 695a881515c40e29fc12eb5003e0f3682bc4d64b (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>
(cherry picked from commit b07a423d0fb1b6bfbdb851195097d6fda38bc20e)
Diffstat (limited to 'qtip/util/env.py')
-rw-r--r-- | qtip/util/env.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qtip/util/env.py b/qtip/util/env.py index e666894a..9299f8c0 100644 --- a/qtip/util/env.py +++ b/qtip/util/env.py @@ -193,7 +193,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: with open(self.keypair['public'], 'r') as f: |