[Piglit] [PATCH 2/3] framework/test: catch Exception rather than a bare except

Dylan Baker dylan at pnwbakers.com
Sat Oct 1 00:43:54 UTC 2016


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/test/base.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/framework/test/base.py b/framework/test/base.py
index 63fcaf4..191ecbc 100644
--- a/framework/test/base.py
+++ b/framework/test/base.py
@@ -209,9 +209,7 @@ class Test(object):
                 self.result.time.end = time.time()
                 self.result = dmesg.update_result(self.result)
                 monitoring.check_monitoring()
-            # This is a rare case where a bare exception is okay, since we're
-            # using it to log exceptions
-            except:
+            except Exception:  # pylint: disable=broad-except
                 exc_type, exc_value, exc_traceback = sys.exc_info()
                 traceback.print_exc(file=sys.stderr)
                 self.result.result = 'fail'
-- 
2.10.0



More information about the Piglit mailing list