Fix parallel execution bug that only ran connect/preconfigure stuff on the last testbed:
authorClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Fri, 29 Apr 2011 08:00:48 +0000 (10:00 +0200)
committerClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Fri, 29 Apr 2011 08:00:48 +0000 (10:00 +0200)
commitdc2f29cf0e796fc8a1f8f07ff48e1d7a05dd3b5e
treeb3fb6f1d21a7371b7e32c745ab841b5f8ff5b309
parentc4a22bc5514eec07b7e64d2b409011c77097acb6
Fix parallel execution bug that only ran connect/preconfigure stuff on the last testbed:
lambda : testbed.do_something   only does it for the last value of the variable "testbed"

Testbed is a free variable, so it takes the value of the variable then the lambda is called,
which is usually the last value it took in the loop.

The correct way would be:
lambda testbed=testbed : testbed.do_something

Since that "freezes" the value of the "testbed" variable.

An easier and nicer way is to use bound methods:

testbed.do_something

(without lambda)
src/nepi/core/execute.py