From 33cab465618c7a82a5d318a18838aab7c9ec9e68 Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Mon, 30 Oct 2023 11:55:33 -0700 Subject: Fix reported problematic input in parsing error message When the input is an invalid URL, the error message will report the whole input string instead of a URL fragment. --- src/wikiget/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wikiget') diff --git a/src/wikiget/parse.py b/src/wikiget/parse.py index 6396b3f..847cfa4 100644 --- a/src/wikiget/parse.py +++ b/src/wikiget/parse.py @@ -51,7 +51,7 @@ def get_dest(dl: str, args: Namespace) -> File: filename = file_match.group(2) else: # no file extension and/or prefix, probably an article - msg = f"Could not parse input '{filename}' as a file" + msg = f"Could not parse input '{dl}' as a file" raise ParseError(msg) filename = unquote(filename) # remove URL encoding for special characters -- cgit v1.2.3