Skip to content

Commit

Permalink
Merge pull request #220 from Jrendl/improve-source-info-mk
Browse files Browse the repository at this point in the history
Improve Performance of source_info.mk()
  • Loading branch information
mballance authored Jul 3, 2024
2 parents 36aca2d + 0bb2762 commit 5f79289
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vsc/model/source_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def mk(cls, levels=1):
if len(stack) <= (levels+1):
raise Exception("requested stack frame %d out-of-bounds (%d)" % (
levels, len(stack)))
frame = inspect.stack()[levels+1]
frame = stack[levels+1]

return cls(frame.filename, frame.lineno)

Expand Down

0 comments on commit 5f79289

Please sign in to comment.