diff options
author | Mathew Robinson <chasinglogic@gmail.com> | 2019-07-31 14:29:21 -0400 |
---|---|---|
committer | Mathew Robinson <chasinglogic@gmail.com> | 2019-07-31 14:29:21 -0400 |
commit | 2c379597163e61009aa6a8c7b9c734e57d317ec5 (patch) | |
tree | a8699b369e33c8f04926e71169f2dff784e07ffc | |
parent | b0099386d35542dfd48f2dd73254fb2e91367e99 (diff) | |
download | scons-git-2c379597163e61009aa6a8c7b9c734e57d317ec5.tar.gz |
Don't chain exceptions in CacheDirTests
-rw-r--r-- | src/engine/SCons/CacheDirTests.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/engine/SCons/CacheDirTests.py b/src/engine/SCons/CacheDirTests.py index 8523fb76b..07c32b409 100644 --- a/src/engine/SCons/CacheDirTests.py +++ b/src/engine/SCons/CacheDirTests.py @@ -138,8 +138,6 @@ class ExceptionTestCase(unittest.TestCase): assert False, "Should have raised exception and did not" except SCons.Errors.SConsEnvironmentError as e: assert str(e) == "Failed to create cache directory {}".format(os.path.join(privileged_dir, "cache")) - except Exception as e: - assert False, "Got unexpected exception: {}".format(str(e)) finally: os.chmod(privileged_dir, stat.S_IWRITE | stat.S_IEXEC | stat.S_IREAD) shutil.rmtree(privileged_dir) @@ -178,8 +176,6 @@ class ExceptionTestCase(unittest.TestCase): assert False, "Should have raised exception and did not" except SCons.Errors.SConsEnvironmentError as e: assert str(e) == "Failed to write cache configuration for {}".format(self._CacheDir.path) - except Exception as e: - assert False, "Got unexpected exception: {}".format(str(e)) def test_raise_environment_error_on_invalid_json(self): config_file = os.path.join(self._CacheDir.path, "config") @@ -196,8 +192,6 @@ class ExceptionTestCase(unittest.TestCase): assert False, "Should have raised exception and did not" except SCons.Errors.SConsEnvironmentError as e: assert str(e) == "Failed to read cache configuration for {}".format(self._CacheDir.path) - except Exception as e: - assert False, "Got unexpected exception: {}".format(str(e)) class FileTestCase(BaseTestCase): """ |