# HG changeset patch # User Henry S. Thompson # Date 1688575764 -3600 # Node ID 69be1131bcc52ab0109a5e7be67008dcb4a13b6a # Parent 689a0e311cd26990108394a9a5fdf82538dcd512 get EOF right, finally diff -r 689a0e311cd2 -r 69be1131bcc5 bin/warc.py --- a/bin/warc.py Wed Jul 05 15:37:16 2023 +0100 +++ b/bin/warc.py Wed Jul 05 17:49:24 2023 +0100 @@ -17,8 +17,8 @@ while l==b'\r\n': l=stream.readline() nb+=(ln:=len(l)) - if ln==0: - break + if ln==0: + break if l!=b'WARC/1.0\r\n': raise ValueError("Not a WARC file? At %s: %s[%s]"%(nb-len(l), l.decode('latin-1'),len(l)))