summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-11-08 14:40:18 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-11-08 14:40:18 +0000
commit61c565bc06a83da75b57f8568fe76f393e665d70 (patch)
tree67b6cf54870fe3a9eb5a5992586939480e5f4c81
parent2e1e2d686ca8f819c202d2ed4e8a5c5758451f26 (diff)
downloadfebootstrap-61c565bc06a83da75b57f8568fe76f393e665d70.tar.gz
febootstrap-61c565bc06a83da75b57f8568fe76f393e665d70.tar.xz
febootstrap-61c565bc06a83da75b57f8568fe76f393e665d70.zip
Fix Python code when _bestPackageFromList returns None.
Yet Another Bug caused by lack of strong typing and nullable types in this sad excuse for a programming language.
-rw-r--r--src/febootstrap_yum_rpm.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/febootstrap_yum_rpm.ml b/src/febootstrap_yum_rpm.ml
index bfda11e..1def619 100644
--- a/src/febootstrap_yum_rpm.ml
+++ b/src/febootstrap_yum_rpm.ml
@@ -78,7 +78,7 @@ while not stable:
for r in pkg.requires:
ps = yb.whatProvides (r[0], r[1], r[2])
best = yb._bestPackageFromList (ps.returnPackages ())
- if best.name != pkg.name:
+ if best and best.name != pkg.name:
deps[pkg].append (best)
if not deps.has_key (best):
deps[best] = False