From cbb7f0503ea40ef439e82a02ff7fcacbc4e2bbd5 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Fri, 18 Dec 2015 11:35:54 +0800 Subject: [PATCH] Create empty file by using os.mknod it is more safe and pythonic. Change-Id: I728649af37cee8d1e255bb0a389cbc532e551c74 --- docker/base/set_configs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index de28c68886..fece1c18d1 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -283,8 +283,7 @@ def execute_config_strategy(): sys.exit(0) else: load_config() - f = open('/configured', 'w+') - f.close() + os.mknod('/configured') else: LOG.error('KOLLA_CONFIG_STRATEGY is not set properly') sys.exit(1)