mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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>
This commit is contained in:
parent
2735bfc5ff
commit
d086467012
@ -370,8 +370,8 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config):
|
|||||||
for s in in_ready:
|
for s in in_ready:
|
||||||
buf = s.read().decode()
|
buf = s.read().decode()
|
||||||
if not buf:
|
if not buf:
|
||||||
s.close()
|
|
||||||
s_in.remove(s)
|
s_in.remove(s)
|
||||||
|
s.close()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not opt.verbose:
|
if not opt.verbose:
|
||||||
|
Loading…
Reference in New Issue
Block a user