Add missing to_bytes on directory path.

pull/15204/head
Matt Clay 9 years ago committed by James Cammarata
parent 07abd05e38
commit 7ddce864a1

@ -21,6 +21,7 @@ import os
import stat
from time import sleep
from errno import EEXIST
from ansible.utils.unicode import to_bytes
__all__ = ['unfrackpath']
@ -35,7 +36,7 @@ def unfrackpath(path):
def makedirs_safe(path, mode=None):
'''Safe way to create dirs in muliprocess/thread environments'''
if not os.path.exists(path):
if not os.path.exists(to_bytes(path, errors='strict')):
try:
if mode:
os.makedirs(path, mode)

Loading…
Cancel
Save