summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py6
1 files changed, 2 insertions, 4 deletions
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