]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix broken format in error for bad input in summarize_stats.py (#117375)
authorGuido van Rossum <guido@python.org>
Fri, 29 Mar 2024 18:31:09 +0000 (11:31 -0700)
committerGitHub <noreply@github.com>
Fri, 29 Mar 2024 18:31:09 +0000 (18:31 +0000)
When you pass the script a non-existent input file, you get a TypeError instead of the intended ValueError.

Tools/scripts/summarize_stats.py

index d40106b868238851e82bdba8520d34228f14e1bc..8dc590b4b89a88a7dcb08d8f83c71c10f1f27c7f 100644 (file)
@@ -114,7 +114,7 @@ def load_raw_data(input: Path) -> RawData:
         return data
 
     else:
-        raise ValueError(f"{input:r} is not a file or directory path")
+        raise ValueError(f"{input} is not a file or directory path")
 
 
 def save_raw_data(data: RawData, json_output: TextIO):