blob: ede9cb002791abf64fe13c146d12ff0ad0505c4e [file] [log] [blame]
import os
def ensure_directory(path):
"""Ensure that the parent directory of `path` exists"""
dirname = os.path.dirname(path)
os.makedirs(dirname, exist_ok=True)