From 1ddc29e1cb703557ab43d14318c279fce8fc609e Mon Sep 17 00:00:00 2001 From: adityacp Date: Fri, 19 Feb 2016 16:19:14 +0530 Subject: Frontend design changes remove older change Remove further changes interface changes interface changes small views.py change change in code evaluator code evaluator changes python code evaluator change exception changes in code evaluator and test cases for python Update test_python_evaluation.py changed variable name in test case Views.py conflict resolve --- yaksh/python_code_evaluator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'yaksh/python_code_evaluator.py') diff --git a/yaksh/python_code_evaluator.py b/yaksh/python_code_evaluator.py index 0c473cf..c87c420 100644 --- a/yaksh/python_code_evaluator.py +++ b/yaksh/python_code_evaluator.py @@ -6,7 +6,7 @@ from os.path import join import importlib # local imports -from code_evaluator import CodeEvaluator +from code_evaluator import CodeEvaluator, TimeoutException class PythonCodeEvaluator(CodeEvaluator): @@ -29,6 +29,10 @@ class PythonCodeEvaluator(CodeEvaluator): fname, lineno, func, text = info[-1] text = str(test_code).splitlines()[lineno-1] err = "{0} {1} in: {2}".format(type.__name__, str(value), text) + except TimeoutException: + raise + except Exception: + err = traceback.format_exc(limit=0) else: success = True err = 'Correct answer' -- cgit