mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
log debug the creating dir process
This commit is contained in:
parent
c4e95b9f48
commit
849d19edd7
1 changed files with 7 additions and 2 deletions
|
@ -3428,12 +3428,16 @@ def makedirs_(path,
|
|||
|
||||
if os.path.isdir(dirname):
|
||||
# There's nothing for us to do
|
||||
return 'Directory {0!r} already exists'.format(dirname)
|
||||
msg = 'Directory {0!r} already exists'.format(dirname)
|
||||
log.debug(msg)
|
||||
return msg
|
||||
|
||||
if os.path.exists(dirname):
|
||||
return 'The path {0!r} already exists and is not a directory'.format(
|
||||
msg = 'The path {0!r} already exists and is not a directory'.format(
|
||||
dirname
|
||||
)
|
||||
log.debug(msg)
|
||||
return msg
|
||||
|
||||
directories_to_create = []
|
||||
while True:
|
||||
|
@ -3447,6 +3451,7 @@ def makedirs_(path,
|
|||
directories_to_create.reverse()
|
||||
for directory_to_create in directories_to_create:
|
||||
# all directories have the user, group and mode set!!
|
||||
log.debug('Creating directory: %s', directory_to_create)
|
||||
mkdir(directory_to_create, user=user, group=group, mode=mode)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue