Skip to content

Commit

Permalink
Avoid unnecessary isinstance check
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Apr 23, 2024
1 parent 47e5738 commit c2283f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fuzzing/fuzz-targets/fuzz_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2283f6

Please sign in to comment.