aboutsummaryrefslogtreecommitdiff
path: root/src/wikiget/dl.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/wikiget/dl.py')
-rw-r--r--src/wikiget/dl.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/wikiget/dl.py b/src/wikiget/dl.py
index 845d136..f210182 100644
--- a/src/wikiget/dl.py
+++ b/src/wikiget/dl.py
@@ -50,7 +50,7 @@ def batch_download(args: Namespace) -> int:
try:
dl_list = read_batch_file(args.FILE)
except OSError as e:
- logger.error(f"File could not be read. {e}")
+ logger.error(f"File could not be read: {e}")
sys.exit(1)
# TODO: validate file contents before download process starts
@@ -102,15 +102,16 @@ def download(f: File, args: Namespace) -> int:
adapter.info(f"{file_url}")
if os.path.isfile(dest) and not args.force:
- adapter.warning("File already exists, skipping download (use -f to force)")
+ # TODO: check for this before the download process starts
+ adapter.warning("File already exists; skipping download (use -f to force)")
errors += 1
elif args.dry_run:
- adapter.warning("Dry run, so nothing actually downloaded")
+ adapter.warning("Dry run; download skipped")
else:
try:
fd = open(dest, "wb")
except OSError as e:
- adapter.error(f"File could not be written. {e}")
+ adapter.error(f"File could not be written: {e}")
errors += 1
return errors
# download the file(s)
@@ -133,7 +134,7 @@ def download(f: File, args: Namespace) -> int:
try:
dl_sha1 = verify_hash(dest)
except OSError as e:
- adapter.error(f"File downloaded but could not be verified. {e}")
+ adapter.error(f"File downloaded but could not be verified: {e}")
errors += 1
return errors