Merge pull request #34966 from whiteinge/minion-swarm-opts-dict

Ensure 'data' remains a dictionary if conf file is empty or missing
This commit is contained in:
Mike Place 2016-07-26 16:11:56 -06:00 committed by GitHub
commit 16ee70867a

View File

@ -267,7 +267,7 @@ class MinionSwarm(Swarm):
if self.opts['config_dir']:
spath = os.path.join(self.opts['config_dir'], 'minion')
with open(spath) as conf:
data = yaml.load(conf)
data = yaml.load(conf) or {}
minion_id = '{0}-{1}'.format(
self.opts['name'],
str(idx).zfill(self.zfill)