mirror of
https://github.com/github/codeql.git
synced 2025-12-26 13:46:31 +01:00
12 lines
328 B
Python
12 lines
328 B
Python
|
|
def separate_headers(files):
|
|
for file in files:
|
|
lines = iter(file)
|
|
try:
|
|
header = next(lines) # Will raise StopIteration if lines is exhausted
|
|
except StopIteration:
|
|
#Empty file -- Just ignore
|
|
continue
|
|
body = [ l for l in lines ]
|
|
yield header, body
|