# HG changeset patch # User Mads Kiilerich # Date 1425655284 -3600 # Node ID a5475229ba28f28882cd118e637641f5ceb64794 # Parent afddaa53ab8a2f02c4bcfd2f02111fcdc9db2ce9 vcs: better handling of closed subprocessio InputStreamChunker source stream test_git_cmd_injection would fail occasionaly. diff -r afddaa53ab8a -r a5475229ba28 kallithea/lib/vcs/subprocessio.py --- a/kallithea/lib/vcs/subprocessio.py Fri Mar 06 16:21:24 2015 +0100 +++ b/kallithea/lib/vcs/subprocessio.py Fri Mar 06 16:21:24 2015 +0100 @@ -133,7 +133,11 @@ "Timed out while waiting for input from subprocess.") t.append(b) da.set() - b = s.read(cs) + try: + b = s.read(cs) + except ValueError: # probably "I/O operation on closed file" + b = '' + self.EOF.set() da.set() # for cases when done but there was no input.