def METHOD_NAME(self, dn):
    """Make sure the given directory exists"""
    try:
        if not os.path.exists(dn):
            os.makedirs(dn)
    except OSError as x:
        if x.errno != errno.EEXIST:
            raise RepositoryError(self.repo, "OSError on directory create: %s" % x)