Skip to content

Commit

Permalink
bug 1854219: fix unboundlocalerror in extract_sym_header_data
Browse files Browse the repository at this point in the history
This fixes the unboundlocalerror when creating the SymParseError. It
also fixes the memory usage issue by switching to readline instead of
readlines.
  • Loading branch information
willkg committed Sep 20, 2023
1 parent 9febd61 commit f7a853f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tecken/upload/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ def extract_sym_header_data(file_path):
"generator": "",
}
with open(file_path, "r") as fp:
line = "no line yet"
try:
for line in fp.readlines():
for line in fp:
if line.startswith("MODULE"):
parts = line.strip().split()
_, opsys, arch, debug_id, debug_filename = parts
Expand Down

0 comments on commit f7a853f

Please sign in to comment.