Skip to content

Commit bf82b68

Browse files
authored
avoid exception when __frame_data["code_context"] is None (#83)
1 parent 262a2bb commit bf82b68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lazy_loader/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def __getattr__(self, x):
112112
f"No module named '{fd['spec']}'\n\n"
113113
"This error is lazily reported, having originally occured in\n"
114114
f' File {fd["filename"]}, line {fd["lineno"]}, in {fd["function"]}\n\n'
115-
f'----> {"".join(fd["code_context"]).strip()}'
115+
f'----> {"".join(fd["code_context"] or "").strip()}'
116116
)
117117

118118

0 commit comments

Comments
 (0)