parameters: (path)
docstring: Make sure the directory 'path' exists in a thread-safe way.
docstring_summary: Make sure the directory 'path' exists in a thread-safe way.
docstring_tokens: Make sure the directory path exists in a thread - safe way .
function: def ensure_dir_exists(path):
    """Make sure the directory 'path' exists in a thread-safe way."""
    try:
      os.makedirs(path)
    except OSError as e:
      if e.errno != errno.EEXIST or not os.path.isdir(path):
        raise e
function_tokens: def ensure_dir_exists ( path ) : try : os . makedirs ( path ) except OSError as e : if e . errno != errno . EEXIST or not os . path . isdir ( path ) : raise e