]>
Commit | Line | Data |
---|---|---|
416d273c JR |
1 | From 61c565bc06a83da75b57f8568fe76f393e665d70 Mon Sep 17 00:00:00 2001 |
2 | From: "Richard W.M. Jones" <rjones@redhat.com> | |
3 | Date: Tue, 8 Nov 2011 14:40:18 +0000 | |
4 | Subject: [PATCH] Fix Python code when _bestPackageFromList returns None. | |
5 | ||
6 | Yet Another Bug caused by lack of strong typing and nullable types in | |
7 | this sad excuse for a programming language. | |
8 | --- | |
9 | src/febootstrap_yum_rpm.ml | 2 +- | |
10 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
11 | ||
12 | diff --git a/src/febootstrap_yum_rpm.ml b/src/febootstrap_yum_rpm.ml | |
13 | index bfda11e..1def619 100644 | |
14 | --- a/src/febootstrap_yum_rpm.ml | |
15 | +++ b/src/febootstrap_yum_rpm.ml | |
16 | @@ -78,7 +78,7 @@ while not stable: | |
17 | for r in pkg.requires: | |
18 | ps = yb.whatProvides (r[0], r[1], r[2]) | |
19 | best = yb._bestPackageFromList (ps.returnPackages ()) | |
20 | - if best.name != pkg.name: | |
21 | + if best and best.name != pkg.name: | |
22 | deps[pkg].append (best) | |
23 | if not deps.has_key (best): | |
24 | deps[best] = False | |
25 | -- | |
26 | 1.7.6 | |
27 |