Skip to content

Commit

Permalink
Fixed access to None in recorder.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-maier committed Dec 13, 2016
1 parent 7debac0 commit 29cb45c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pywbem/_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,11 @@ def record(self, pywbem_args, pywbem_result, http_request, http_response):
tc_request_headers[hdr_name] = \
http_request.headers[hdr_name]
tc_http_request['headers'] = tc_request_headers
data = http_request.payload.decode('utf-8')
data = data.replace('><', '>\n<').strip()
if http_request.payload is not None:
data = http_request.payload.decode('utf-8')
data = data.replace('><', '>\n<').strip()
else:
data = None
tc_http_request['data'] = data
testcase['http_request'] = tc_http_request

Expand Down

0 comments on commit 29cb45c

Please sign in to comment.