diff options
author | Noel Power <noel.power@suse.com> | 2018-11-04 17:32:19 +0000 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-12-10 10:38:21 +0100 |
commit | a25bd836ee601ca704d2899f17259b9b5cd440cf (patch) | |
tree | 2d80355287e7640f5c837f697a7190e0bcd5a5d8 /source4 | |
parent | 0d73a2b0a29c108c3a0efbbe0473142046302b71 (diff) | |
download | samba-a25bd836ee601ca704d2899f17259b9b5cd440cf.tar.gz |
python/samba/tests: PY3 port samba.tests.dns
Misc hanges needed to get make test TEST=samba.tests.dns &
samb.tests.dns_fowarder to run and pass under PY3
* socket.send needs bytes not string
* rec.dwTimeStamp expects int not float (in PY3 / operator
will give float results, for int use '//' instead)
* re.match using bytes needs a bytes search term
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/scripting/bin/samba_dnsupdate | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index 0b40e114ad9..db63cd24afe 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -50,6 +50,7 @@ from samba.netcmd.dns import cmd_dns from samba import gensec from samba.kcc import kcc_utils from samba.compat import get_string +from samba.compat import text_type import ldb samba.ensure_third_party_module("dns", "dnspython") @@ -677,7 +678,7 @@ def rodc_dns_update(d, t, op): else: name.dns_register = False dns_names.names = [ name ] - site_name = sub_vars['SITE'].decode('utf-8') + site_name = text_type(sub_vars['SITE']) global error_count |