From a745e1ad30563fe3e7f302426ea0f1bae31d8ec9 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 8 Nov 2021 11:38:56 -0800 Subject: [PATCH] Log the total number of downloaded apks. --- fdroidapk.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fdroidapk.py b/fdroidapk.py index ec0727f..cb1a9b0 100644 --- a/fdroidapk.py +++ b/fdroidapk.py @@ -93,6 +93,8 @@ def fpk_argparse(args): if packages == ['*']: packages = ls_packages(pathclass.cwd()) + download_count = 0 + for package in packages: package = normalize_package_name(package) log.info('Checking %s.', package) @@ -120,11 +122,14 @@ def fpk_argparse(args): try: download_file(apk_url, this_dest) + download_count += 1 except Exception as exc: log.error('%s was unable to download apk (%s).', package, exc) return_status = 1 continue + log.info('Downloaded %d apks.', download_count) + return return_status @operatornotify.main_decorator(subject='fdroidapk.py')