Commit d823ad5f authored by Dylan Baker's avatar Dylan Baker

piglit: Only catch parsed.func AttributeError

Fixes catching AttributeErrors it shouldn't.
Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
Tested-by: Mark Janes's avatarMark Janes <mark.a.janes@intel.com>
Tested-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
parent 4dc0f0e0
......@@ -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__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment