openface/helper.py
def mkdirP(path):
    """
    Create a directory and don't error if the path already exists.

    If the directory already exists, don't do anything.

    :param path: The directory to create.
    :type path: str
    """
    try:
        os.makedirs(path)
    except OSError as exc:  # Python >2.5
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else:
            raise

    Create a directory and don't error if the path already exists.

    If the directory already exists, don't do anything.

    :param path: The directory to create.
    :type path: str
    
Create a directory and don't error if the path already exists.
If the directory already exists, don't do anything.
Create a directory and don ' t error if the path already exists . If the directory already exists don ' t do anything .
def mkdirP(path):
    try:
        os.makedirs(path)
    except OSError as exc:  
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else:
            raise
def mkdirP ( path ) : try : os . makedirs ( path ) except OSError as exc : if exc . errno == errno . EEXIST and os . path . isdir ( path ) : pass else : raise
Create a directory and don't error if the path already exists.
Create a directory and don ' t error if the path already exists .
"""
    Create a directory and don't error if the path already exists.

    If the directory already exists, don't do anything.

    :param path: The directory to create.
    :type path: str
    """ # Python >2.5
path
The directory to create.
The directory to create .