[1/3] piglit: Only catch parsed.func AttributeError

Submitted by Dylan Baker on Oct. 25, 2016, 7:54 p.m.

Details

Message ID 20161025195403.25672-2-dylan@pnwbakers.com
State New
Headers show
Series "Fix summary breakage" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Oct. 25, 2016, 7:54 p.m.
Fixes catching AttributeErrors it shouldn't.

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

Patch hide | download patch | download mbox

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__':