From c2283f6e3566606300f64c44a12197f0b65f0d71 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 23 Apr 2024 08:21:58 +0200 Subject: [PATCH] Avoid unnecessary isinstance check --- fuzzing/fuzz-targets/fuzz_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzzing/fuzz-targets/fuzz_config.py b/fuzzing/fuzz-targets/fuzz_config.py index 81dcf9a88..80ab7b08d 100644 --- a/fuzzing/fuzz-targets/fuzz_config.py +++ b/fuzzing/fuzz-targets/fuzz_config.py @@ -35,7 +35,7 @@ def TestOneInput(data): except (MissingSectionHeaderError, ParsingError, UnicodeDecodeError): return -1 # Reject inputs raising expected exceptions except ValueError as e: - if isinstance(e, ValueError) and "embedded null byte" in str(e): + if "embedded null byte" in str(e): # The `os.path.expanduser` function, which does not accept strings # containing null bytes might raise this. return -1