mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Ensure 'data' remains a dictionary if conf file is empty or missing
This commit is contained in:
parent
73d3b77a2c
commit
ca61237de7
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue