def _write(self, path, data): """Write YAML helper.""" # Do it before opening file. If dump causes error it will now not # truncate the file. data = dump(data) with open(path, 'w', encoding='utf-8') as outfile: outfile.write(data)
def _write(self, path, data): """Write YAML""" data = dump(data) with open(path, 'w', encoding='utf-8') as outfile: outfile.write(data)