From 2af03d288a1b7c439a673b78a6e041d8c5023b9c Mon Sep 17 00:00:00 2001 From: Lukas Rothenberger Date: Mon, 17 Jun 2024 09:38:55 +0200 Subject: [PATCH] fix: potential Value Error in PEGraphX.contains_line --- discopop_explorer/PEGraphX.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/discopop_explorer/PEGraphX.py b/discopop_explorer/PEGraphX.py index 3ee63a790..5849287e1 100644 --- a/discopop_explorer/PEGraphX.py +++ b/discopop_explorer/PEGraphX.py @@ -212,7 +212,9 @@ def end_position(self) -> LineID: return LineID(f"{self.file_id}:{self.end_line}") def contains_line(self, other_line) -> bool: - if other_line == "GlobalVar": + if other_line == "GlobalVar" or other_line == "LineNotFound": + return False + if not ":" in other_line: return False other_file_id = int(other_line.split(":")[0]) other_line_num = int(other_line.split(":")[1])