summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2010-02-24 17:21:34 -0500
committerChris Lumens <clumens@redhat.com>2010-02-25 09:36:37 -0500
commit8ed1789952c33485125cd8a177c97c3c52b8a96c (patch)
tree584b41e174639c1d0229d18d951d517285dbe53b
parent0276637ac2c1913d9c795e2bc8da880ddeaa7d95 (diff)
downloadanaconda-8ed1789952c33485125cd8a177c97c3c52b8a96c.tar.gz
anaconda-8ed1789952c33485125cd8a177c97c3c52b8a96c.tar.xz
anaconda-8ed1789952c33485125cd8a177c97c3c52b8a96c.zip
rpm doesn't always give the callback a tuple (#567878).
On erasure callbacks, we get just a string that's the name of the package in question instead of the usual tuple. We're most likely to hit this during upgrades, after packages have been installed.
-rw-r--r--yuminstall.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 0d773f759..2ada82059 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -233,6 +233,9 @@ class AnacondaCallback:
elif what in (rpm.RPMCALLBACK_CPIO_ERROR,
rpm.RPMCALLBACK_UNPACK_ERROR,
rpm.RPMCALLBACK_SCRIPT_ERROR):
+ if not isinstance(h, types.TupleType):
+ h = (h, None)
+
(hdr, rpmloc) = h
# Script errors store whether or not they're fatal in "total". So,