aboutsummaryrefslogtreecommitdiff
path: root/src/wikiget
diff options
context:
space:
mode:
authorCody Logan <cody@lokken.dev>2023-10-30 11:55:33 -0700
committerCody Logan <cody@lokken.dev>2023-10-30 11:55:33 -0700
commit33cab465618c7a82a5d318a18838aab7c9ec9e68 (patch)
tree7e93112c5a8893cc8b53c37ac49d6d7bcb3f17ea /src/wikiget
parentbceed708e2b6191d1283075183577185ed63fa1f (diff)
downloadwikiget-33cab465618c7a82a5d318a18838aab7c9ec9e68.tar.gz
wikiget-33cab465618c7a82a5d318a18838aab7c9ec9e68.zip
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.
Diffstat (limited to 'src/wikiget')
-rw-r--r--src/wikiget/parse.py2
1 files changed, 1 insertions, 1 deletions
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