Skip to content

Commit

Permalink
Merge pull request #21437 from rallytime/bp-21409
Browse files Browse the repository at this point in the history
Backport #21409 to 2014.7
  • Loading branch information
thatch45 committed Mar 9, 2015
2 parents 4fb4178 + 8a65d8c commit 6ac6a53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion salt/utils/verify.py
Expand Up @@ -10,6 +10,7 @@
import re
import sys
import stat
import errno
import socket
import logging

Expand Down Expand Up @@ -161,8 +162,11 @@ def verify_files(files, user):
for fn_ in files:
dirname = os.path.dirname(fn_)
try:
if not os.path.isdir(dirname):
try:
os.makedirs(dirname)
except OSError as err:
if err.errno != errno.EEXIST:
raise
if not os.path.isfile(fn_):
with salt.utils.fopen(fn_, 'w+') as fp_:
fp_.write('')
Expand Down

0 comments on commit 6ac6a53

Please sign in to comment.