diff -r 884b595f5195 -r 5326e4ef1dab mercurial/keepalive.py --- a/mercurial/keepalive.py Mon Oct 02 18:18:57 2017 +0100 +++ b/mercurial/keepalive.py Fri Sep 29 15:49:20 2017 +0000 @@ -135,7 +135,8 @@ del self._connmap[connection] del self._readymap[connection] self._hostmap[host].remove(connection) - if not self._hostmap[host]: del self._hostmap[host] + if not self._hostmap[host]: + del self._hostmap[host] finally: self._lock.release() @@ -621,7 +622,8 @@ f = fo.readline() if f: foo = foo + f - else: break + else: + break fo.close() m = md5(foo) print(format % ('keepalive readline', m.hexdigest()))