Skip to content

Commit 5efe09a

Browse files
committed
Frozen dist: avoid TypeError with "go to error" from console
1 parent 37f393a commit 5efe09a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cdl/utils/misc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ def go_to_error(text: str) -> None:
5959
if match:
6060
path = match.group(1)
6161
line_number = match.group(2)
62-
if not osp.isfile(path):
63-
otherpath = osp.join(get_mod_source_dir(), path)
62+
mod_src_dir = get_mod_source_dir()
63+
if not osp.isfile(path) and mod_src_dir is not None:
64+
otherpath = osp.join(mod_src_dir, path)
6465
if not osp.isfile(otherpath):
6566
# TODO: [P3] For frozen app, go to error is implemented only when the
6667
# source code is available locally (development mode).

0 commit comments

Comments
 (0)