Esempio n. 1
0
 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)
Esempio n. 2
0
 def _write(self, path, data):
     """Write YAML"""
     data = dump(data)
     with open(path, 'w', encoding='utf-8') as outfile:
         outfile.write(data)