Change to just surround the mkdir

This commit is contained in:
Mike Place 2016-06-02 14:36:56 -06:00
parent 21b7123a60
commit 635efa248b

View File

@ -256,9 +256,12 @@ def save_minions(jid, minions, syndic_id=None):
try:
if not os.path.exists(jid_dir):
os.makedirs(jid_dir)
try:
os.makedirs(jid_dir)
except OSError:
pass
serial.dump(minions, salt.utils.fopen(minions_path, 'w+b'))
except (IOError, OSError) as exc:
except IOError as exc:
log.error(
'Failed to write minion list {0} to job cache file {1}: {2}'
.format(minions, minions_path, exc)