]> sourceware.org Git - lvm2.git/commitdiff
lvmdbustest.py: Correct debug & assert order
authorTony Asleson <tasleson@redhat.com>
Thu, 9 Mar 2017 22:07:14 +0000 (16:07 -0600)
committerTony Asleson <tasleson@redhat.com>
Thu, 9 Mar 2017 22:39:47 +0000 (16:39 -0600)
If we do the assert first we won't get to the print statement.

test/dbus/lvmdbustest.py

index 6c928e25c1612b780360242dec5729f1a8d29773..f8a1918816baa99795f6fdecf91843f0bc3bd4b7 100755 (executable)
@@ -1734,10 +1734,10 @@ class TestDbusService(unittest.TestCase):
                        path = self._lookup(resource_name)
                        self.assertTrue(path != '/')
                else:
-                       self.assertTrue(ec == 0, "%s exit code = %d" % (operation, ec))
                        std_err_print(
                                "%s failed with stdout= %s, stderr= %s" %
                                (operation, stdout, stderr))
+                       self.assertTrue(ec == 0, "%s exit code = %d" % (operation, ec))
 
        def test_external_vg_create(self):
                # We need to ensure that if a user creates something outside of lvm
This page took 0.030349 seconds and 5 git commands to generate.