From a3c645d10091f792a18dd9933f535c2ff3a5a84d Mon Sep 17 00:00:00 2001 From: Perun CaseStudies Date: Mon, 11 Nov 2024 03:20:23 +0100 Subject: [PATCH] Deltadebugging fix type checker --- perun/deltadebugging/factory.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/perun/deltadebugging/factory.py b/perun/deltadebugging/factory.py index 21c547f2..a107d566 100644 --- a/perun/deltadebugging/factory.py +++ b/perun/deltadebugging/factory.py @@ -110,10 +110,13 @@ def run_command_with_input(executable: Executable, complement: str, **kwargs: An def read_input(is_fuzzing: bool, **kwargs: Any) -> str: if is_fuzzing: - mutation: Mutation = kwargs.get("mutation") + mutation = kwargs.get("mutation") + if mutation is None: + raise ValueError("Got unexpected mutation") input_file = mutation.path else: - input_file = kwargs.get("input_sample") + input_file = kwargs.get("input_sample", "") + input_path = Path(input_file) if input_path.is_file(): with open(input_path, "r") as file: