Formatting

This commit is contained in:
Faris Ansari 2018-08-01 12:39:37 +05:30
parent 5b3b2a9617
commit 3960f0a5f5

View file

@ -286,16 +286,13 @@ class FrappeClient(object):
raise
if rjson and ("exc" in rjson) and rjson["exc"]:
exc = None
try:
exc = json.loads(rjson["exc"])[0]
exc = 'FrappeClient Request Failed\n\n' + exc
except Exception:
pass
exc = rjson["exc"]
if exc:
frappe.throw(exc, exc=FrappeException, title="FrappeClient request failed")
else:
raise FrappeException(rjson["exc"])
raise FrappeException(exc)
if 'message' in rjson:
return rjson['message']
elif 'data' in rjson: