diff --git a/openstack_requirements/check.py b/openstack_requirements/check.py index 4e9cb2699b..cd4b49d550 100644 --- a/openstack_requirements/check.py +++ b/openstack_requirements/check.py @@ -204,6 +204,13 @@ def _find_constraint(req, constraints): for constraint_setting, _ in constraints: if constraint_setting.markers == req.markers: return constraint_setting + if not constraint_setting.markers: + # There is no point in performing the complex + # comparison for a constraint that has no markers, so + # we skip it here. If we find no closer match then the + # loop at the end of the function will look for a + # constraint without a marker and use that. + continue # NOTE(dhellmann): This is a very naive attempt to check # marker compatibility that relies on internal # implementation details of the packaging library. The