changeset 30395 | 10514a92860e |
parent 30359 | 673f0fdc1046 |
child 30417 | 854190becacb |
--- a/mercurial/util.py Thu Nov 10 16:37:18 2016 -0500 +++ b/mercurial/util.py Mon Nov 14 23:32:54 2016 +0000 @@ -2190,6 +2190,11 @@ subsequent_indent=hangindent) return wrapper.fill(line).encode(encoding.encoding) +def iterfile(fp): + """like fp.__iter__ but does not have issues with EINTR. Python 2.7.12 is + known to have such issues.""" + return iter(fp.readline, '') + def iterlines(iterator): for chunk in iterator: for line in chunk.splitlines():