def _mkdir_p(pathname):
    if not os.path.exists(pathname):
        basedir, _ = os.path.split(pathname)
        if not os.path.exists(basedir):
            _mkdir_p(basedir)
            logging.info("creating directory: %s" % pathname)
        os.mkdir(pathname)
dataset/ETHPy150Open rackerlabs/openstack-guest-agents-unix/commands/network.py/_mkdir_p/original