Skip to content

Commit 6c3aa82

Browse files
authored
Merge pull request #327 from cclauss/patch-1
Fix code smell reported by Python 3.8
2 parents ec7ae2b + 390f28e commit 6c3aa82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel_gateway/notebook_http/request_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def parse_body(request):
6565
"""
6666
content_type = TEXT_PLAIN
6767
body = request.body
68-
body = '' if body is b'' or body is None else body.decode(encoding='UTF-8')
68+
body = body.decode(encoding='UTF-8') if body else ''
6969
if 'Content-Type' in request.headers:
7070
content_type = request.headers['Content-Type']
7171
return_body = body

0 commit comments

Comments
 (0)