Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Update dump_as_yaml_to_file
Browse files Browse the repository at this point in the history
Create the temporary file as binary because `vault.decrypt` returns
bytes and not string.

Closes #235
  • Loading branch information
elyezer committed Aug 28, 2017
1 parent ec859b5 commit 8f9336f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rho/vault.py
Expand Up @@ -157,7 +157,7 @@ def dump_as_yaml_to_file(self, obj, file_path):
:param obj: Python object to convert to yaml
:param file_path: The file to write data to via temp file
"""
with tempfile.NamedTemporaryFile(mode='w', delete=False) as data_temp:
with tempfile.NamedTemporaryFile(delete=False) as data_temp:
self.dump_as_yaml(obj, data_temp)
data_temp.close()
move(data_temp.name, os.path.abspath(file_path))

0 comments on commit 8f9336f

Please sign in to comment.