summaryrefslogtreecommitdiffstats
path: root/dovetail/utils/dovetail_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'dovetail/utils/dovetail_utils.py')
-rw-r--r--dovetail/utils/dovetail_utils.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/dovetail/utils/dovetail_utils.py b/dovetail/utils/dovetail_utils.py
index 23285e3c..fc007e51 100644
--- a/dovetail/utils/dovetail_utils.py
+++ b/dovetail/utils/dovetail_utils.py
@@ -134,12 +134,13 @@ def get_ext_net_name(env_file, logger=None):
insecure = os.getenv('OS_INSECURE',)
if https_enabled:
logger.info("https enabled...")
- if insecure.lower() == "true":
- insecure_option = ' --insecure '
- else:
- logger.warn("Env variable OS_INSECURE is {}, if https + no "
- "credential used, should be set as True."
- .format(insecure))
+ if insecure:
+ if insecure.lower() == "true":
+ insecure_option = ' --insecure '
+ else:
+ logger.warn("Env variable OS_INSECURE is {}, if https + no "
+ "credential used, should be set as True."
+ .format(insecure))
cmd_check = "openstack %s network list" % insecure_option
ret, msg = exec_cmd(cmd_check, logger)