Create empty file by using os.mknod

it is more safe and pythonic.

Change-Id: I728649af37cee8d1e255bb0a389cbc532e551c74
This commit is contained in:
Jeffrey Zhang 2015-12-18 11:35:54 +08:00
parent 03fd08d867
commit cbb7f0503e
1 changed files with 1 additions and 2 deletions

View File

@ -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)