[Piglit] [PATCH 1/3] piglit: Only catch parsed.func AttributeError
Dylan Baker
dylan at pnwbakers.com
Tue Oct 25 19:54:01 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__':
--
2.10.1
More information about the Piglit
mailing list