aboutsummaryrefslogtreecommitdiff
path: root/src/wikiget/dl.py
diff options
context:
space:
mode:
authorCody Logan <cody@lokken.dev>2023-11-16 11:09:14 -0800
committerCody Logan <cody@lokken.dev>2023-11-16 11:13:44 -0800
commit291d4ab44eaf5fcd2a4033f705170eb27dfe74e8 (patch)
tree7defb5d80f8e05e68651789cbc9b889e0c55902c /src/wikiget/dl.py
parentce58a03caa6f4d9e3cb01898b4b73716031b24dd (diff)
downloadwikiget-291d4ab44eaf5fcd2a4033f705170eb27dfe74e8.tar.gz
wikiget-291d4ab44eaf5fcd2a4033f705170eb27dfe74e8.zip
Fix bug when downloading non-local files from a wiki
Revert to the pre-v0.6.0 method of checking for file existence. A change introduced in v0.6.0 caused the check to fail if the file existed only in a shared repository and not locally on the requested wiki.
Diffstat (limited to 'src/wikiget/dl.py')
-rw-r--r--src/wikiget/dl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wikiget/dl.py b/src/wikiget/dl.py
index 60405d0..722bf62 100644
--- a/src/wikiget/dl.py
+++ b/src/wikiget/dl.py
@@ -184,7 +184,7 @@ def download(f: File, args: Namespace) -> int:
# prepend the current filename to all log messages
adapter = FileLogAdapter(logger, {"filename": filename})
- if file.exists:
+ if file.imageinfo:
# file exists either locally or at a common repository, like Wikimedia Commons
file_url = file.imageinfo["url"]
file_size = file.imageinfo["size"]