From 353cdd006a467375809eb3c21dc44df7efb9c1d9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 27 Nov 2010 10:28:15 +1100 Subject: wintest: avoid adding a blank line to resolv.conf on each run Autobuild-User: Andrew Tridgell Autobuild-Date: Sat Nov 27 01:47:48 CET 2010 on sn-devel-104 --- wintest/test-s4-howto.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'wintest') diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py index c05d084dc5b..3d4b5e0511b 100755 --- a/wintest/test-s4-howto.py +++ b/wintest/test-s4-howto.py @@ -105,13 +105,12 @@ def set_nameserver(t, nameserver): nameserver %s # your original resolv.conf appears below: - ''' % t.substitute(nameserver)) child = t.pexpect_spawn("cat /etc/resolv.conf", crlf=False) i = child.expect(['your original resolv.conf appears below:', pexpect.EOF]) if i == 0: child.expect(pexpect.EOF) - contents = child.before.replace('\r', '') + contents = child.before.lstrip().replace('\r', '') t.write_file('/etc/resolv.conf.wintest', contents, mode='a') t.write_file('/etc/resolv.conf.wintest-bak', contents) t.run_cmd("mv -f /etc/resolv.conf.wintest /etc/resolv.conf") -- cgit