def check_create_dir()

in app/source/dragen/src/scheduler/scheduler_utils.py [0:0]


def check_create_dir(path):
    if not os.path.exists(path):
        try:
            os.makedirs(path)  # Attempt to create the directory
        except OSError as e:
            print("ERROR: Could not create directory %s!" % path)
            raise e

    if not os.path.isdir(path):
        err = "ERROR: Path %s exists and is not a directory!" % path
        print(err)
        raise OSError(err)

    return