From 192f3001aea604f42e1f316b66b75b9bc782c277 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Nov 2010 16:42:43 +1100 Subject: wintest: fixed cleanup of /etc/resolv.conf Autobuild-User: Andrew Tridgell Autobuild-Date: Wed Nov 24 07:29:49 CET 2010 on sn-devel-104 --- wintest/test-s4-howto.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wintest/test-s4-howto.py') diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py index dd79e04be1d..67c98e951c8 100755 --- a/wintest/test-s4-howto.py +++ b/wintest/test-s4-howto.py @@ -104,6 +104,7 @@ nameserver %s def restore_resolv_conf(t): '''restore the /etc/resolv.conf after testing is complete''' if getattr(t, 'resolv_conf_backup', False): + t.info("restoring /etc/resolv.conf") t.run_cmd("mv -f %s /etc/resolv.conf" % t.resolv_conf_backup) def rndc_cmd(t, cmd, checkfail=True): @@ -703,6 +704,7 @@ def test_howto(t): def test_cleanup(t): '''cleanup after tests''' + t.info("Cleaning up ...") restore_resolv_conf(t) if getattr(t, 'bind_child', False): t.bind_child.kill() @@ -750,7 +752,7 @@ if __name__ == '__main__': try: test_howto(t) - except Exception, str: + except: if not opts.nocleanup: test_cleanup(t) raise -- cgit v1.2.1