From cbb6b43038f0d88b28197ba905ba9324c0602945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= Date: Thu, 3 Sep 2020 15:05:23 +0200 Subject: [PATCH] client-python: Add getter for package count to downloader Add a new method get_package_count() to the DebugInfoDownload class which returns the number of packages that will be downloaded. --- src/client-python/reportclient/debuginfo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client-python/reportclient/debuginfo.py b/src/client-python/reportclient/debuginfo.py index cb318e8a..eeb2be30 100644 --- a/src/client-python/reportclient/debuginfo.py +++ b/src/client-python/reportclient/debuginfo.py @@ -242,6 +242,9 @@ class DebugInfoDownload(object): def get_install_size(self): return self.installed_size + def get_package_count(self): + return len(self.package_files_dict) + def mute_stdout(self): """ Links sys.stdout with /dev/null and saves the old stdout -- 2.26.2