Skip to content

Commit 425998b

Browse files
ulfalizergalak
authored andcommitted
scripts: elf_helper: Tidy up get_symbols() to eliminate pylint warning
Using a member variable in the dict comprehension was probably a typo (can't see 'sym' referenced elsewhere). Use a local variable instead. Made pylint spit out these warnings (which might be spurious though): scripts/elf_helper.py:535:24: E0203: Access to member 'sym' before its definition line 536 (access-member-before-definition) scripts/elf_helper.py:535:39: E0203: Access to member 'sym' before its definition line 536 (access-member-before-definition) Signed-off-by: Ulf Magnusson <[email protected]>
1 parent d5b0bd1 commit 425998b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/elf_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ def find_kobjects(self, syms):
533533
def get_symbols(self):
534534
for section in self.elf.iter_sections():
535535
if isinstance(section, SymbolTableSection):
536-
return {self.sym.name: self.sym.entry.st_value
537-
for self.sym in section.iter_symbols()}
536+
return {sym.name: sym.entry.st_value
537+
for sym in section.iter_symbols()}
538538

539539
raise LookupError("Could not find symbol table")
540540

0 commit comments

Comments
 (0)