MCPcopy Create free account
hub / github.com/HexHive/NASS / _show_code_line

Function _show_code_line

tools/gef.py:1769–1773  ·  view source on GitHub ↗
(fname: str, idx: int)

Source from the content-addressed store, hash-verified

1767 """Display the last Python exception."""
1768
1769 def _show_code_line(fname: str, idx: int) -> str:
1770 fname = os.path.expanduser(os.path.expandvars(fname))
1771 with open(fname, "r") as f:
1772 _data = f.readlines()
1773 return _data[idx - 1] if 0 < idx < len(_data) else ""
1774
1775 gef_print("")
1776 exc_type, exc_value, exc_traceback = sys.exc_info()

Callers 1

show_last_exceptionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected