[yum-commits] Branch 'yum-3_2_X' - output.py
Tim Lauridsen
timlau at osuosl.org
Thu Jan 28 05:59:57 UTC 2010
output.py | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 5427683986881aa527d5ccc2e48a9349edbf3e32
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Thu Jan 28 06:58:52 2010 +0100
stop format_missing_requires from exploding, if ayum is not set (current yumex uses DepSolveProgressCallback(), fixed upstream to use DepSolveProgressCallback(ayum=self), but other users can hit this too) (rhbz #558770)
diff --git a/output.py b/output.py
index 456e1cf..110aa0b 100755
--- a/output.py
+++ b/output.py
@@ -1634,6 +1634,12 @@ class DepSolveProgressCallBack:
msg = _('Package: %s') % (prob_pkg,)
ui_req = formatRequire(needname, needversion, needflags)
msg += _('\n Requires: %s') % (ui_req,)
+
+ # if DepSolveProgressCallback() is used instead of DepSolveProgressCallback(ayum=<YumBase Object>)
+ # then ayum has no value and we can't continue to find details about the missing requirements
+ if not yb:
+ return msg
+
ipkgs = set()
for pkg in sorted(yb.rpmdb.getProvides(needname)):
ipkgs.add(pkg.pkgtup)
More information about the Yum-commits
mailing list