def ensure_dir(dirname):
    """
    Ensure that a named directory exists; if it does not, attempt to create it.
    """
    try:
        os.makedirs(dirname)
    except __HOLE__, e:
        if e.errno != errno.EEXIST:
            raise
dataset/ETHPy150Open VisTrails/VisTrails/scripts/dist/windows/update_alps.py/ensure_dir