diff options
author | Noel Power <noel.power@suse.com> | 2018-05-04 15:29:59 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-05-12 21:38:17 +0200 |
commit | c50ccc714a1871ef6eaa3bfc9b16c232127d3fad (patch) | |
tree | 4e206a61d8aaed397de0185a94d1dd5243e990ca /python/samba/schema.py | |
parent | 6f30a0b5f11b58ab0bb528c7387099171703de4c (diff) | |
download | samba-c50ccc714a1871ef6eaa3bfc9b16c232127d3fad.tar.gz |
python/samba: py2/py3 compatability always decode result of b64encode
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/schema.py')
-rw-r--r-- | python/samba/schema.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/schema.py b/python/samba/schema.py index 67ec357a285..c5537080296 100644 --- a/python/samba/schema.py +++ b/python/samba/schema.py @@ -122,7 +122,7 @@ class Schema(object): setup_path("provision_schema_basedn_modify.ldif"), {"SCHEMADN": schemadn, "OBJVERSION" : schema_version}) - descr = b64encode(get_schema_descriptor(domain_sid)) + descr = b64encode(get_schema_descriptor(domain_sid)).decode('utf8') self.schema_dn_add = read_and_sub_file( setup_path("provision_schema_basedn.ldif"), {"SCHEMADN": schemadn, "DESCRIPTOR": descr}) @@ -136,7 +136,7 @@ class Schema(object): for map in additional_prefixmap: self.prefixmap_data += "%s\n" % map - self.prefixmap_data = b64encode(self.prefixmap_data) + self.prefixmap_data = b64encode(self.prefixmap_data).decode('utf8') # We don't actually add this ldif, just parse it prefixmap_ldif = "dn: %s\nprefixMap:: %s\n\n" % (self.schemadn, self.prefixmap_data) |