mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
certprofile plugin: Use binary mode for file with binary data
Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
bdee890014
commit
6ddf0d657f
@@ -224,7 +224,7 @@ class certprofile_show(LDAPRetrieve):
|
||||
|
||||
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'")
|
||||
|
||||
Reference in New Issue
Block a user