#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import (
    absolute_import, division, print_function, unicode_literals
)

import os


def ensure_dir(dir_path):
    """ Ensures existence of a directory """
    if not os.path.isdir(dir_path):
        if os.path.exists(dir_path):
            raise IOError(
                "Path exists but is not a directory: '{:}'".format(dir_path)
            )
        else:
            os.makedirs(dir_path)

3e8583bf3243236a9f627d8bf087c11a76872a95
<mask token>

<mask token>


def ensure_dir(dir_path):
    """ Ensures existence of a directory """
    if not os.path.isdir(dir_path):
        if os.path.exists(dir_path):
            raise IOError("Path exists but is not a directory: '{:}'".
                format(dir_path))
        else:
            os.makedirs(dir_path)

from __future__ import absolute_import, division, print_function, unicode_literals
import os


def ensure_dir(dir_path):
    """ Ensures existence of a directory """
    if not os.path.isdir(dir_path):
        if os.path.exists(dir_path):
            raise IOError("Path exists but is not a directory: '{:}'".
                format(dir_path))
        else:
            os.makedirs(dir_path)

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import (
    absolute_import, division, print_function, unicode_literals
)

import os


def ensure_dir(dir_path):
    """ Ensures existence of a directory """
    if not os.path.isdir(dir_path):
        if os.path.exists(dir_path):
            raise IOError(
                "Path exists but is not a directory: '{:}'".format(dir_path)
            )
        else:
            os.makedirs(dir_path)
