[Piglit] [PATCH 01/12] framework/exectest.py: Fix a few pylint warnings
Dylan Baker
baker.dylan.c at gmail.com
Fri Apr 25 09:58:49 PDT 2014
This removes some unreachable code, adds an name definition to the Test
constructor, and comments a bare except. There are only a couple of
cases where a bare except is appropriate, most of the time it is a
problem, but we are using one the few cases where it is okay, we're
logging all exceptions to a file.
Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
framework/exectest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/framework/exectest.py b/framework/exectest.py
index 3056a78..6544ef2 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -57,6 +57,7 @@ class Test(object):
execute it's work (i.e. __doRunWork) on the calling thread
(i.e. the main thread) or from the ConcurrentTestPool threads.
'''
+ self._command = None
self.run_concurrent = run_concurrent
self.command = command
self.env = {}
@@ -86,6 +87,8 @@ class Test(object):
self.run()
self.result['time'] = time.time() - time_start
self.result = dmesg.update_result(self.result)
+ # This is a rare case where a bare exception is okay, since we're
+ # using it to log exceptions
except:
exception = sys.exc_info()
self.result['result'] = 'fail'
@@ -124,7 +127,6 @@ class Test(object):
def interpret_result(self):
raise NotImplementedError
- return out
def run(self):
"""
--
2.0.0.rc0
More information about the Piglit
mailing list