Skip to content

Commit

Permalink
Use 'is'/'is not' instead of '==' to avoid Py3 warnings about compari…
Browse files Browse the repository at this point in the history
…ng disparate types.
  • Loading branch information
wiml committed Mar 22, 2019
1 parent 085f30c commit 4cb71f9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/twisted/web/distrib.py
Expand Up @@ -114,7 +114,7 @@ def __init__(self, request):
self.request = request

def finished(self, result):
if result != server.NOT_DONE_YET:
if result is not server.NOT_DONE_YET:
assert isinstance(result, str), "return value not a string"
self.request.write(result)
self.request.finish()
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion src/twisted/web/server.py
Expand Up @@ -311,7 +311,7 @@ def render(self, resrc):
body = epage.render(self)
# end except UnsupportedMethod

if body == NOT_DONE_YET:
if body is NOT_DONE_YET:
return
if not isinstance(body, bytes):
body = resource.ErrorPage(
Expand Down

0 comments on commit 4cb71f9

Please sign in to comment.