Merge pull request #92832 from marload/patch-0706-03

Refactoring: Change Inf Loop Condition (1 -> True)
This commit is contained in:
Kubernetes Prow Robot 2020-07-10 23:03:20 -07:00 committed by GitHub
commit d20c5ed626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ def is_binary(pathname):
try: try:
with open(pathname, 'r') as f: with open(pathname, 'r') as f:
CHUNKSIZE = 1024 CHUNKSIZE = 1024
while 1: while True:
chunk = f.read(CHUNKSIZE) chunk = f.read(CHUNKSIZE)
if '\0' in chunk: # found null byte if '\0' in chunk: # found null byte
return True return True