# HG changeset patch # User Marcin Kuzminski # Date 2018-02-03 18:49:26 # Node ID 270ea1449b69690b9df1c8915c4654734bbdf068 # Parent 58336b172ef93261057983b6eb99f72cbbe8f8e6 subprocessio: use safe b.read() and prevent potential valueErrors diff --git a/vcsserver/subprocessio.py b/vcsserver/subprocessio.py --- a/vcsserver/subprocessio.py +++ b/vcsserver/subprocessio.py @@ -141,7 +141,12 @@ class InputStreamChunker(Thread): t.append(b) da.set() - b = s.read(cs) + + try: + b = s.read(cs) + except ValueError: + b = '' + self.EOF.set() da.set() # for cases when done but there was no input.