We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1ea3db2 + 3358f8f commit 22c1e0eCopy full SHA for 22c1e0e
1 file changed
lib/galaxy/util/__init__.py
@@ -323,8 +323,11 @@ def iter_start_of_line(fh, chunk_size=None):
323
if not data:
324
break
325
if not data.endswith("\n"):
326
- # Discard the rest of the line
327
- fh.readline()
+ # Discard the rest of the line without reading it all into memory
+ while True:
328
+ line_rest = fh.readline(CHUNK_SIZE)
329
+ if not line_rest or line_rest.endswith("\n"):
330
+ break
331
yield data
332
333
0 commit comments