From 684b3ccf77b5051d9bc15b931ea756f4639492c2 Mon Sep 17 00:00:00 2001 From: Kui Shi Date: Wed, 21 Aug 2013 10:48:55 +0800 Subject: [PATCH] flake8 H202 error in test_image_utils.py H202 will detect following case: self.assertRaises(Exception, foo) Replace Exception with test.TestingException to pass the H202 checking. Bug #1214365 Change-Id: Idbd13d11995e6a22e99bb9d63c344a5b1a75f987 --- cinder/tests/test_image_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/tests/test_image_utils.py b/cinder/tests/test_image_utils.py index 86e690d65..09f0f7992 100644 --- a/cinder/tests/test_image_utils.py +++ b/cinder/tests/test_image_utils.py @@ -184,9 +184,9 @@ class TestTemporaryFile(test.TestCase): def sut(): with image_utils.temporary_file(): - raise Exception() + raise test.TestingException() - self.assertRaises(Exception, sut) + self.assertRaises(test.TestingException, sut) class TestCoalesceChain(test.TestCase): -- 2.45.2