python/samba/netcmd: PY3 only possible to decode bytes
authorNoel Power <noel.power@suse.com>
Thu, 27 Sep 2018 17:16:49 +0000 (18:16 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Oct 2018 03:50:25 +0000 (05:50 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/domain.py

index f022e3718a63243e9753e215aaaba1f27e423ad6..2278fb5f318bc4afd22936384845c6476a4ef314 100644 (file)
@@ -1848,7 +1848,7 @@ class DomainTrustCommand(Command):
         objectAttr = lsa.ObjectAttribute()
         objectAttr.sec_qos = lsa.QosInfo()
 
-        policy = conn.OpenPolicy2(''.decode('utf-8'),
+        policy = conn.OpenPolicy2(b''.decode('utf-8'),
                                   objectAttr, policy_access)
 
         info = conn.QueryInfoPolicy2(policy, lsa.LSA_POLICY_INFO_DNS)