wintest: py3 telnet.sendline() doesn't like string with ^Z
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sun, 17 Mar 2019 01:49:14 +0000 (14:49 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 2 Jul 2019 04:21:36 +0000 (04:21 +0000)
Try using bytes instead.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
wintest/test-s4-howto.py
wintest/wintest.py

index 5102387124a5e98223d1a3da5bd900bef17e3c63..2c8758dd6e2bb5b1349f645e3bd753a46d69f87e 100755 (executable)
@@ -160,7 +160,7 @@ def run_dcpromo(t, vm):
     t.info("Joining a windows VM ${WIN_VM} to the domain as a DC using dcpromo")
     child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}", set_ip=True, set_noexpire=True)
     child.sendline("copy /Y con answers.txt")
-    child.sendline('''
+    child.sendline(b'''
 [DCINSTALL]
 RebootOnSuccess=Yes
 RebootOnCompletion=Yes
@@ -315,7 +315,7 @@ def run_dcpromo_rodc(t, vm):
     t.vm_restore("${WIN_VM}", "${WIN_SNAPSHOT}")
     child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}", set_ip=True)
     child.sendline("copy /Y con answers.txt")
-    child.sendline('''
+    child.sendline(b'''
 [DCInstall]
 ReplicaOrNewDomain=ReadOnlyReplica
 ReplicaDomainDNSName=${LCREALM}
index c239bab5506cc68c1cf25ca28560460bd77e6adb..914b5d61689a3c1e206879996f0fc26fcc5bf291 100644 (file)
@@ -834,7 +834,7 @@ options {
 
         """This server must therefore not yet be a directory server, so we must promote it"""
         child.sendline("copy /Y con answers.txt")
-        child.sendline('''
+        child.sendline(b'''
 [DCInstall]
 ; New forest promotion
 ReplicaOrNewDomain=Domain