File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,23 @@ def __process_inara_response(self, resp):
9494 EDR_LOG .log (u"No Inara response: resp={}" .format (resp ), "WARNING" )
9595 return None
9696
97- json_resp = json .loads (resp )
98- if not json_resp .get ("body" , None ):
99- EDR_LOG .log (u"No Inara body: json_resp={}" .format (json_resp ), "WARNING" )
97+ EDR_LOG .log (u"Processing Inara response: resp={}" .format (resp ), "DEBUG" )
98+
99+ body = None
100+ try :
101+ json_resp = json .loads (resp )
102+ if not json_resp .get ("body" , None ):
103+ EDR_LOG .log (u"No Inara body: json_resp={}" .format (json_resp ), "WARNING" )
104+ return None
105+ body = json_resp ["body" ]
106+ except :
107+ EDR_LOG .log (u"Exception during extraction of Inara body: resp={}" .format (resp ), "WARNING" )
108+ return None
109+
110+ if body is None :
111+ EDR_LOG .log (u"No Inara body: resp={}" .format (resp ), "WARNING" )
100112 return None
101113
102- body = json_resp ["body" ]
103114 EDR_LOG .log (u"Inara body={}" .format (body ), "DEBUG" )
104115 try :
105116 if body ["header" ]["eventStatus" ] == 400 :
You can’t perform that action at this time.
0 commit comments