Skip to content

Commit

Permalink
gh-113317: Argument Clinic: don't use fail() in CLI (#115513)
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland authored Feb 15, 2024
1 parent edb59d5 commit 98ee4ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2500,12 +2500,12 @@ def parse_file(

extension = os.path.splitext(filename)[1][1:]
if not extension:
fail(f"Can't extract file type for file {filename!r}")
raise ClinicError(f"Can't extract file type for file {filename!r}")

try:
language = extensions[extension](filename)
except KeyError:
fail(f"Can't identify file type for file {filename!r}")
raise ClinicError(f"Can't identify file type for file {filename!r}")

with open(filename, encoding="utf-8") as f:
raw = f.read()
Expand Down

0 comments on commit 98ee4ec

Please sign in to comment.