mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-25 02:13:06 +00:00
lib: fix mypy error
We're reusing f as a TextIO after it was defined as a BinaryIO.
This commit is contained in:
parent
4f56a22d2e
commit
03fd5eeed4
@ -94,8 +94,8 @@ def _get_fallback_vmcoreinfo() -> Dict[str, Any]:
|
||||
elf_symbol = elf_file.symbols['_stext'][0].st_value
|
||||
except (KeyError, IndexError):
|
||||
raise ValueError('could not find _stext symbol in vmlinux') from None
|
||||
with open('/proc/kallsyms', 'r') as f:
|
||||
kallsyms = f.read()
|
||||
with open('/proc/kallsyms', 'r') as kallsyms_file:
|
||||
kallsyms = kallsyms_file.read()
|
||||
kallsyms_match = re.search(r'^([0-9a-fA-F]+) . _stext$', kallsyms,
|
||||
re.MULTILINE)
|
||||
if not kallsyms_match:
|
||||
|
Loading…
Reference in New Issue
Block a user