guydav commited on
Commit
597b02f
1 Parent(s): ca0dc38

Experimenting with how I return results

Browse files
Files changed (1) hide show
  1. restrictedpython_code_eval.py +2 -2
restrictedpython_code_eval.py CHANGED
@@ -458,8 +458,8 @@ def _check_correctness(check_program, timeout, task_id, completion_id,
458
  completion_id=completion_id,
459
  )
460
 
461
- if 'failed' in result[0] and len(result) > 1:
462
- exc = result[1]
463
  out_dict["exception_type"] = type(exc).__name__
464
  out_dict["exception_description"] = str(exc)
465
 
 
458
  completion_id=completion_id,
459
  )
460
 
461
+ if 'exception' in result:
462
+ exc = result['exception']
463
  out_dict["exception_type"] = type(exc).__name__
464
  out_dict["exception_description"] = str(exc)
465