Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 236156f

Browse files
committed
Use True/False for ints instead of 1/0. That's so Python 2.0.
1 parent 84f71d0 commit 236156f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/http/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ def begin(self):
359359

360360
if self.version == 9:
361361
self.length = None
362-
self.chunked = 0
363-
self.will_close = 1
362+
self.chunked = False
363+
self.will_close = True
364364
self.msg = email.message_from_string('')
365365
return
366366

@@ -373,10 +373,10 @@ def begin(self):
373373
# are we using the chunked-style of transfer encoding?
374374
tr_enc = self.msg.get("transfer-encoding")
375375
if tr_enc and tr_enc.lower() == "chunked":
376-
self.chunked = 1
376+
self.chunked = True
377377
self.chunk_left = None
378378
else:
379-
self.chunked = 0
379+
self.chunked = False
380380

381381
# will the connection close at the end of the response?
382382
self.will_close = self._check_close()
@@ -411,7 +411,7 @@ def begin(self):
411411
if (not self.will_close and
412412
not self.chunked and
413413
self.length is None):
414-
self.will_close = 1
414+
self.will_close = True
415415

416416
def _check_close(self):
417417
conn = self.msg.get("connection")

0 commit comments

Comments
 (0)