From 3dc491758daad9df794feea90c1387297032149a Mon Sep 17 00:00:00 2001 From: david-sarah Date: Sat, 8 Oct 2011 22:21:06 -0700 Subject: [PATCH] util/happinessutil.py: suppress a warning from check-miscaptures. (It is not a bug because the capturing function is only used by a 'map' in the same iteration.) refs #1556 --- src/allmydata/util/happinessutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/allmydata/util/happinessutil.py b/src/allmydata/util/happinessutil.py index 33ba5673..b8e8b542 100644 --- a/src/allmydata/util/happinessutil.py +++ b/src/allmydata/util/happinessutil.py @@ -147,7 +147,8 @@ def servers_of_happiness(sharemap): # is the amount of unused capacity on that edge. Taking the # minimum of a list of those values for each edge in the # augmenting path gives us our delta. - delta = min(map(lambda (u, v): residual_function[u][v], path)) + delta = min(map(lambda (u, v), rf=residual_function: rf[u][v], + path)) for (u, v) in path: flow_function[u][v] += delta flow_function[v][u] -= delta -- 2.45.2