aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2016-03-26 17:49:22 +0800
committerMatthew Shao <me@matshao.com>2016-03-26 17:49:22 +0800
commit66bd27e6f9018832f99be1c211e76c8f71165c92 (patch)
treeeb2c886a955a7f19775d4c971474c1e4c7240f00 /netlib
parent53e15f778df316a223847cb81e4f2eb25d29a539 (diff)
downloadmitmproxy-66bd27e6f9018832f99be1c211e76c8f71165c92.tar.gz
mitmproxy-66bd27e6f9018832f99be1c211e76c8f71165c92.tar.bz2
mitmproxy-66bd27e6f9018832f99be1c211e76c8f71165c92.zip
update comments
Diffstat (limited to 'netlib')
-rw-r--r--netlib/http/http1/assemble.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/netlib/http/http1/assemble.py b/netlib/http/http1/assemble.py
index db5a49ce..f06ad5a1 100644
--- a/netlib/http/http1/assemble.py
+++ b/netlib/http/http1/assemble.py
@@ -5,8 +5,8 @@ import itertools
from ...exceptions import HttpException
def assemble_request(request):
- if request.content == None:
- raise HttpException("Cannot assemble flow with None content")
+ if request.content is None:
+ raise HttpException("Cannot assemble flow with missing content")
head = assemble_request_head(request)
body = b"".join(assemble_body(request.data.headers, [request.data.content]))
return head + body
@@ -19,8 +19,8 @@ def assemble_request_head(request):
def assemble_response(response):
- if response.content == None:
- raise HttpException("Cannot assemble flow with None content")
+ if response.content is None:
+ raise HttpException("Cannot assemble flow with missing content")
head = assemble_response_head(response)
body = b"".join(assemble_body(response.data.headers, [response.data.content]))
return head + body