tests:blackbox: let samba_dnsupdate.py provide more details
authorStefan Metzmacher <metze@samba.org>
Tue, 2 Aug 2016 16:38:33 +0000 (18:38 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 4 Aug 2016 16:26:07 +0000 (18:26 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12108

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
python/samba/tests/blackbox/samba_dnsupdate.py

index 8cf367f6c35b19c1ecf884cea1a47e1ab67a9495..ee8ae2673f45d02ff6dc493be167d39171631ebc 100644 (file)
@@ -44,14 +44,14 @@ class SambaDnsUpdateTests(samba.tests.BlackboxTestCase):
 
         try:
             out = self.check_output("samba_dnsupdate --verbose --use-nsupdate --current-ip=10.0.0.1")
 
         try:
             out = self.check_output("samba_dnsupdate --verbose --use-nsupdate --current-ip=10.0.0.1")
-        except samba.tests.BlackboxProcessError:
-            self.fail("Error calling samba_dnsupdate")
+        except samba.tests.BlackboxProcessError as e:
+            self.fail("Error calling samba_dnsupdate: %s" % e)
 
         self.assertTrue("No DNS updates needed" in out, out)
         try:
             out = self.check_output("samba_dnsupdate --verbose --use-samba-tool --rpc-server-ip=%s" % self.server_ip)
 
         self.assertTrue("No DNS updates needed" in out, out)
         try:
             out = self.check_output("samba_dnsupdate --verbose --use-samba-tool --rpc-server-ip=%s" % self.server_ip)
-        except samba.tests.BlackboxProcessError:
-            self.fail("Error calling samba_dnsupdate")
+        except samba.tests.BlackboxProcessError as e:
+            self.fail("Error calling samba_dnsupdate: %s" % e)
 
         self.assertTrue(" DNS updates and" in out, out)
         self.assertTrue(" DNS deletes needed" in out, out)
 
         self.assertTrue(" DNS updates and" in out, out)
         self.assertTrue(" DNS deletes needed" in out, out)