[Piglit] [PATCH 3/27] piglit: Only catch parsed.func AttributeError

Dylan Baker dylan at pnwbakers.com
Mon Oct 24 19:54:49 UTC 2016


Fixes catching AttributeErrors it shouldn't.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 piglit | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/piglit b/piglit
index 4ce6c41..6c1d30a 100755
--- a/piglit
+++ b/piglit
@@ -163,11 +163,11 @@ def main():
     # to that executable
     parsed, args = parser.parse_known_args(input_)
     try:
-        returncode = parsed.func(args)
+        runner = parsed.func
     except AttributeError:
         parser.print_help()
         sys.exit(1)
-    sys.exit(returncode)
+    sys.exit(runner(args))
 
 
 if __name__ == '__main__':
-- 
git-series 0.8.10


More information about the Piglit mailing list