diff options
author | Chris Lumens <clumens@redhat.com> | 2009-07-08 17:23:52 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-07-09 10:09:22 -0400 |
commit | e8378e07fc5e3bf9e9f3812384d29905b4db794f (patch) | |
tree | 14a3c407890c8cd5c5135f66fe05b817cd35a814 /yuminstall.py | |
parent | 5afa005f53b0276eee9517c95c626a7966498716 (diff) | |
download | anaconda-e8378e07fc5e3bf9e9f3812384d29905b4db794f.tar.gz anaconda-e8378e07fc5e3bf9e9f3812384d29905b4db794f.tar.xz anaconda-e8378e07fc5e3bf9e9f3812384d29905b4db794f.zip |
Use a method yum provides, rather than inventing our own.
Diffstat (limited to 'yuminstall.py')
-rw-r--r-- | yuminstall.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/yuminstall.py b/yuminstall.py index 623911d51..478b22b1a 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) |