File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -325,22 +325,22 @@ def _read_header(cls, fileobj):
325
325
326
326
hdr [Field .MAGIC_NUMBER ] = magic_number
327
327
328
- f .fobj .seek (1 , os .SEEK_CUR ) # Skip \n
328
+ f .fobj .seek (1 , os .SEEK_CUR ) # Skip \n
329
329
330
330
found_end = False
331
331
332
332
# Read all key-value pairs contained in the header, stop at EOF
333
333
for n_line , line in enumerate (f .fobj , 1 ):
334
334
line = asstr (line ).strip ()
335
335
336
- if not line : # Skip empty lines
336
+ if not line : # Skip empty lines
337
337
continue
338
338
339
- if line == "END" : # End of the header
339
+ if line == "END" : # End of the header
340
340
found_end = True
341
341
break
342
342
343
- if ':' not in line : # Invalid header line
343
+ if ':' not in line : # Invalid header line
344
344
raise HeaderError (f"Invalid header (line { n_line } ): { line } " )
345
345
346
346
key , value = line .split (":" , 1 )
You can’t perform that action at this time.
0 commit comments