From 6c53c90ee5dd7184889fd3f99130b194e75fef4c Mon Sep 17 00:00:00 2001 From: adityacp Date: Fri, 17 Mar 2017 13:57:21 +0530 Subject: Change Exception message for load questions --- yaksh/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'yaksh/models.py') diff --git a/yaksh/models.py b/yaksh/models.py index 80e215e..970f136 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -316,10 +316,8 @@ class Question(models.Model): files_list=None): try: questions = json.loads(questions_list) - except json.decoder.JSONDecodeError: - exc_type, exc_value, exc_tb = sys.exc_info() - tb_list = traceback.format_exception(exc_type, exc_value, exc_tb) - msg = "Error Parsing Json: {0}".format(tb_list[-1]) + except ValueError as exc_msg: + msg = "Error Parsing Json: {0}".format(exc_msg) return msg for question in questions: question['user'] = user -- cgit