[PATCH 2/3] Test for stringiness instead of explicit rpm.hdr class in install callback

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

 



Allows the "hdr" part to be anything that supports dict-like access,
whereas on cleanup/remove it's always a string-like object.
---
 pyanaconda/yuminstall.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index 877a0f5..93f980a 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -236,10 +236,10 @@ class AnacondaCallback:
             (hdr, rpmloc) = h
 
             # If this is a cleanup/remove, then hdr is a string not a header.
-            if isinstance(hdr, rpm.hdr):
-                name = hdr['name']
-            else:
+            if isinstance(hdr, basestring):
                 name = hdr
+            else:
+                name = hdr['name']
 
             # Script errors store whether or not they're fatal in "total".  So,
             # we should only error out for fatal script errors or the cpio and
-- 
1.7.4

_______________________________________________
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