From ca61237de7c7a561ffd44dbb8f637401fcad3f65 Mon Sep 17 00:00:00 2001 From: Seth House Date: Thu, 14 Apr 2016 11:43:28 -0600 Subject: [PATCH] Ensure 'data' remains a dictionary if conf file is empty or missing --- tests/minionswarm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/minionswarm.py b/tests/minionswarm.py index fec86f5e87..776b3c8a70 100644 --- a/tests/minionswarm.py +++ b/tests/minionswarm.py @@ -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)