From e5fc8bd89effe074db8dc6b70db184db9725e58b Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 10 Jun 2010 18:17:40 +0100 Subject: [PATCH] Test against Python 2.7 too Fixed a warning about Python 3 compatibility. --- tests/allpython.sh | 2 +- zeroinstall/injector/solver.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/allpython.sh b/tests/allpython.sh index 730843c..246ea4b 100755 --- a/tests/allpython.sh +++ b/tests/allpython.sh @@ -1,5 +1,5 @@ #!/bin/sh set -e -x -for version in 2.5 "2.6 -3"; do +for version in 2.5 "2.6" "2.7 -3"; do python$version -tt ./testall.py done diff --git a/zeroinstall/injector/solver.py b/zeroinstall/injector/solver.py index da7c4e7..30025ef 100644 --- a/zeroinstall/injector/solver.py +++ b/zeroinstall/injector/solver.py @@ -238,11 +238,10 @@ class SATSolver(Solver): dep_union = [sat.neg(requiring_impl_var)] for candidate in impls_for_iface[dep_iface]: for r in dependency.restrictions: - if not r.meets_restriction(candidate): + if candidate.__class__ is not _DummyImpl and not r.meets_restriction(candidate): #warn("%s rejected due to %s", candidate.get_version(), r) if candidate.version is not None: break - # else it's the dummy version that matches everything else: c_var = impl_to_var.get(candidate, None) if c_var is not None: -- 2.11.4.GIT