aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Logan <clpo13@gmail.com>2020-01-28 14:08:54 -0800
committerCody Logan <clpo13@gmail.com>2020-01-28 14:12:10 -0800
commit5d4007032ffdb3fefdad48a87674e0af4aab7dc4 (patch)
treed2147153ff3d40c40b6e52bbfc0ca1b69db14177
parent21bd3641d69a8558fd75195a76ead8f07101768a (diff)
downloadwikiget-5d4007032ffdb3fefdad48a87674e0af4aab7dc4.tar.gz
wikiget-5d4007032ffdb3fefdad48a87674e0af4aab7dc4.zip
Better feedback when input can't be downloaded
-rw-r--r--wikiget/dl.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/wikiget/dl.py b/wikiget/dl.py
index b074269..cd8e175 100644
--- a/wikiget/dl.py
+++ b/wikiget/dl.py
@@ -60,15 +60,7 @@ def download(dl, args):
filename = file_match.group(2)
else:
# no file extension and/or prefix, probably an article
- print('Downloading Wikipedia articles is not currently supported.',
- end='')
- if file_match and not file_match.group(1):
- # file extension detected, but no prefix
- # TODO: no longer possible to get to this point since
- # file_match is None with no prefix
- print(" If this is a file, please add the 'File:' prefix.")
- else:
- print('\n', end='')
+ print("Could not parse input '{}' as a file. ".format(filename))
sys.exit(1)
filename = unquote(filename) # remove URL encoding for special characters