Skip to content

Commit e1b72ab

Browse files
committed
change the rest resp as json format
Signed-off-by: archerwen <[email protected]>
1 parent 1419808 commit e1b72ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/redfish/rest/v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,11 +951,11 @@ def _rest_request(self, path, method='GET', args=None, body=None,
951951

952952
try:
953953
LOGGER.debug('HTTP RESPONSE for %s:\nCode: %s\n\nHeaders:\n' \
954-
'%s\nBody Response of %s: %s\n'%\
954+
'%s\nBody Response of %s:\n%s\n'%\
955955
(restresp.request.path,
956956
str(restresp._http_response.status_code)+ ' ' + \
957957
restresp._http_response.reason,
958-
headerstr, restresp.request.path, restresp.read))
958+
headerstr, restresp.request.path, json.dumps(json.loads(restresp.read), indent=4)))
959959
except:
960960
LOGGER.debug('HTTP RESPONSE:\nCode:%s', restresp)
961961
else:

0 commit comments

Comments
 (0)