Added NoneType exception handling in settings & server modules while returning json response.

This commit is contained in:
Murtuza Zabuawala
2015-11-13 16:59:16 +00:00
committed by Dave Page
parent fe10994fb9
commit 52b86b6fb4
2 changed files with 19 additions and 3 deletions

View File

@@ -75,9 +75,15 @@ def store(setting=None, value=None):
success = 0
errormsg = e.message
try:
info = traceback.format_exc()
except Exception as e:
info = str(e)
return make_json_response(success=success,
errormsg=errormsg,
info=traceback.format_exc(),
info=info,
result=request.form)
@blueprint.route("/get", methods=['POST'])
@@ -100,7 +106,12 @@ def get(setting=None, default=None):
success = 0
errormsg = e.message
try:
info = traceback.format_exc()
except Exception as e:
info = str(e)
return make_json_response(success=success,
errormsg=errormsg,
info=traceback.format_exc(),
info=info,
result=request.form)