Skip to content

Commit 9974344

Browse files
fix: potential Value Error in PEGraphX.contains_line
1 parent aaa7ae6 commit 9974344

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

discopop_explorer/PEGraphX.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ def end_position(self) -> LineID:
212212
return LineID(f"{self.file_id}:{self.end_line}")
213213

214214
def contains_line(self, other_line) -> bool:
215-
if other_line == "GlobalVar":
215+
if other_line == "GlobalVar" or other_line == "LineNotFound":
216+
return False
217+
if not ":" in other_line:
216218
return False
217219
other_file_id = int(other_line.split(":")[0])
218220
other_line_num = int(other_line.split(":")[1])

0 commit comments

Comments
 (0)