summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Pfeiffer-Raddatz <raddatz.karsten@gmail.com>2020-04-13 13:48:04 +0200
committerKarsten Pfeiffer-Raddatz <raddatz.karsten@gmail.com>2020-04-14 06:49:31 +0000
commitd086467012e1970f44f27b67b4296a2a6fb097d5 (patch)
tree05507d1ec39195eba657eb1b2b851261981564b9
parent2735bfc5ff6599fd3ca9a361484259908d03804d (diff)
downloadgit-repo-d086467012e1970f44f27b67b4296a2a6fb097d5.tar.gz
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 <dpursehouse@collab.net> Tested-by: Karsten Pfeiffer-Raddatz <raddatz.karsten@gmail.com>
-rw-r--r--subcmds/forall.py2
1 files changed, 1 insertions, 1 deletions
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):
370 for s in in_ready: 370 for s in in_ready:
371 buf = s.read().decode() 371 buf = s.read().decode()
372 if not buf: 372 if not buf:
373 s.close()
374 s_in.remove(s) 373 s_in.remove(s)
374 s.close()
375 continue 375 continue
376 376
377 if not opt.verbose: 377 if not opt.verbose: