From: Ian Jackson Date: Fri, 11 May 2018 15:59:05 +0000 (+0100) Subject: fishdescriptor: Fix a tuple bug in fd permutation X-Git-Tag: archive/debian/6.0.2_bpo9+1^2~5 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=086feb1679c895d85c9f0f533c5cf0806a52a6dc fishdescriptor: Fix a tuple bug in fd permutation 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 --- diff --git a/fishdescriptor/fishdescriptor b/fishdescriptor/fishdescriptor index 77e9e68..d583533 100755 --- a/fishdescriptor/fishdescriptor +++ b/fishdescriptor/fishdescriptor @@ -62,7 +62,7 @@ def implement_pending(): 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]