[PATCH] Use a method yum provides, rather than inventing our own.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 yuminstall.py |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 623911d..478b22b 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -743,17 +743,12 @@ class AnacondaYum(YumSorter):
         downloadpkgs = []
         totalSize = 0
         totalFiles = 0
-        for txmbr in self.tsInfo.getMembers():
-            if txmbr.ts_state in ['i', 'u']:
-                po = txmbr.po
-            else:
-                continue
-
-            if po:
-                totalSize += int(po.returnSimple("installedsize")) / 1024
-                for filetype in po.returnFileTypes():
-                    totalFiles += len(po.returnFileEntries(ftype=filetype))
-                downloadpkgs.append(po)
+        for txmbr in self.tsInfo.getMembersWithState(output_states=TS_INSTALL_STATES):
+            if txmbr.po:
+                totalSize += int(txmbr.po.returnSimple("installedsize")) / 1024
+                for filetype in txmbr.po.returnFileTypes():
+                    totalFiles += len(txmbr.po.returnFileEntries(ftype=filetype))
+                downloadpkgs.append(txmbr.po)
 
         return (downloadpkgs, totalSize, totalFiles)
 
-- 
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux