Skip to content

Commit

Permalink
certprofile plugin: Use binary mode for file with binary data
Browse files Browse the repository at this point in the history
Part of the work for: https://fedorahosted.org/freeipa/ticket/4985

Reviewed-By: Martin Basti <[email protected]>
Reviewed-By: Petr Spacek <[email protected]>
  • Loading branch information
encukou authored and MartinBasti committed May 5, 2016
1 parent bdee890 commit 6ddf0d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipalib/plugins/certprofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def forward(self, *keys, **options):

result = super(certprofile_show, self).forward(*keys, **options)
if 'out' in options and 'config' in result['result']:
with open(options['out'], 'w') as f:
with open(options['out'], 'wb') as f:
f.write(result['result'].pop('config'))
result['summary'] = (
_("Profile configuration stored in file '%(file)s'")
Expand Down

0 comments on commit 6ddf0d6

Please sign in to comment.