df126de8c3
Port an addition in libreport Python API from upstream in order to
hotfix interoperability with abrt.
The commit in question:
cbb6b43038
Resolves rhbz#1906405
29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
From cbb6b43038f0d88b28197ba905ba9324c0602945 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
|
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
|
|
|