wintest: handle missing firewall commands
authorAndrew Tridgell <tridge@samba.org>
Fri, 26 Nov 2010 23:27:22 +0000 (10:27 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sat, 27 Nov 2010 00:03:30 +0000 (01:03 +0100)
my w2k3 box doesn't have these firewall commands

wintest/wintest.py

index 36d0659f031f3b064b1fcab0a468a8e5db894039..1c5b087aa126b20d45eb7a4d781f6bd262d452b6 100644 (file)
@@ -319,7 +319,9 @@ class wintest():
         child.expect("C:")
         if i == 1:
             child.sendline('netsh firewall set opmode mode = DISABLE profile = ALL')
-            child.expect("Ok")
+            i = child.expect(["Ok", "The following command was not found"])
+            if i != 0:
+                self.info("Firewall disable failed - ignoring")
             child.expect("C:")
  
     def set_dns(self, child):