From d086467012e1970f44f27b67b4296a2a6fb097d5 Mon Sep 17 00:00:00 2001 From: Karsten Pfeiffer-Raddatz Date: Mon, 13 Apr 2020 13:48:04 +0200 Subject: forall.py: Close file after removing the stream In order to remove the stream fileno() will be called on the filedescriptor. If the file is already closed fileno() will raise an error and forall will fail. Bug: https://crbug.com/gerrit/12563 Change-Id: Ib7b895fe881c844e3eb3672b011fdcdbdae63024 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/262838 Reviewed-by: David Pursehouse Tested-by: Karsten Pfeiffer-Raddatz --- subcmds/forall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subcmds/forall.py') diff --git a/subcmds/forall.py b/subcmds/forall.py index 74d1ede7..a13793d0 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -370,8 +370,8 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config): for s in in_ready: buf = s.read().decode() if not buf: - s.close() s_in.remove(s) + s.close() continue if not opt.verbose: -- cgit v1.2.3-54-g00ecf