diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-27 10:28:15 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-27 01:47:48 +0100 |
commit | 353cdd006a467375809eb3c21dc44df7efb9c1d9 (patch) | |
tree | 733eb2e18b5af9b7794ba9db9699ba845c760a72 /wintest | |
parent | 3bc6145143da320979c867b155bacaf8125adf3a (diff) | |
download | samba-353cdd006a467375809eb3c21dc44df7efb9c1d9.tar.gz samba-353cdd006a467375809eb3c21dc44df7efb9c1d9.tar.bz2 samba-353cdd006a467375809eb3c21dc44df7efb9c1d9.zip |
wintest: avoid adding a blank line to resolv.conf on each run
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Nov 27 01:47:48 CET 2010 on sn-devel-104
Diffstat (limited to 'wintest')
-rwxr-xr-x | wintest/test-s4-howto.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py index c05d084dc5..3d4b5e0511 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") |