From 980fe4c9237ff98ba4cb165854831d56b2ffc39c Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Tue, 3 Jan 2012 18:07:03 +0100 Subject: Fix test code. --- pmstestsuite/library/standard/banned_commands.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pmstestsuite/library/standard/banned_commands.py b/pmstestsuite/library/standard/banned_commands.py index 7e3de17..5ddc80f 100644 --- a/pmstestsuite/library/standard/banned_commands.py +++ b/pmstestsuite/library/standard/banned_commands.py @@ -36,12 +36,12 @@ class DoHardCommandTest(BannedCommandTest): except IndexError: res = None + exc = None if self.eapi < 4: try: self.assertTrue(res, 'hardlink created') except AssertionError as e: - if exc is None: - exc = e + exc = e try: self.assertTrue(output[1] == '0', 'hardlink preserved after merge', undefined = True) @@ -76,9 +76,6 @@ class DoSedCommandTest(BannedCommandTest): if self.eapi < 4: self.assertEqual(res, 'SED WORKED', 'dosed result') - elif res is not None or exc: + elif res is not None: self.assertNotEqual(res, 'SED WORKED', 'dosed result', undefined = True) - - if exc: - raise exc -- cgit v1.2.3-65-gdbad