def write_if_updated(path, s): # gen_helpers.write_if_updated() wrapper that handles logging and # creating missing parents, as needed. if not path.parent.is_dir(): path.parent.mkdir(parents=True) written = gen_helpers.write_if_updated(path, s) logger.debug('%s %s', 'wrote' if written else 'did NOT write', path) return written
def write_if_updated(path, s): # gen_helpers.write_if_updated() wrapper that handles logging. written = gen_helpers.write_if_updated(path, s) logger.debug('%s %s', 'wrote' if written else 'did NOT write', path) return written
def write_if_updated(filename, s): # Wrapper around gen_helpers.write_if_updated() that uses 'out_dir'. gen_helpers.write_if_updated(os.path.join(out_dir, filename), s)