The fd permutation algorithm would fail in nontrivial cases because it
tries to update individual members of the tupes in the fdmap. That is
not permitted in Python. Make the tuples into lists.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
for (nominal, there), actual in zip(pending, actuals):
overwriting_info = fdmap.get(nominal)
if overwriting_info is not None: os.close(overwriting_info[0])
for (nominal, there), actual in zip(pending, actuals):
overwriting_info = fdmap.get(nominal)
if overwriting_info is not None: os.close(overwriting_info[0])
- fdmap[nominal] = (actual, donor, there)
+ fdmap[nominal] = [actual, donor, there]
def implement_sockinfo(nominal):
(actual, tdonor, there) = fdmap[nominal]
def implement_sockinfo(nominal):
(actual, tdonor, there) = fdmap[nominal]