Skip to content

Commit 7b648e8

Browse files
authored
Check linecache before using (#1047)
1 parent 1cddb17 commit 7b648e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shiny/express/expressify_decorator/_expressify.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ def read_ast(filename: str) -> ast.Module | None:
215215
# with open(filename) as fd:
216216
# return ast.parse(fd.read(), filename=filename)
217217

218+
linecache.checkcache(filename)
218219
lines = linecache.getlines(filename)
219220
if len(lines) == 0:
220221
return None

0 commit comments

Comments
 (0)