diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py --- a/mercurial/keepalive.py +++ b/mercurial/keepalive.py @@ -134,7 +134,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() @@ -616,7 +617,8 @@ f = fo.readline() if f: foo = foo + f - else: break + else: + break fo.close() m = md5(foo) print(format % ('keepalive readline', m.hexdigest())) diff --git a/mercurial/pure/bdiff.py b/mercurial/pure/bdiff.py --- a/mercurial/pure/bdiff.py +++ b/mercurial/pure/bdiff.py @@ -60,7 +60,8 @@ bin = [] p = [0] - for i in a: p.append(p[-1] + len(i)) + for i in a: + p.append(p[-1] + len(i)) d = difflib.SequenceMatcher(None, a, b).get_matching_blocks() d = _normalizeblocks(a, b, d) diff --git a/mercurial/pure/mpatch.py b/mercurial/pure/mpatch.py --- a/mercurial/pure/mpatch.py +++ b/mercurial/pure/mpatch.py @@ -75,7 +75,8 @@ # copy all the patches into our segment so we can memmove from them pos = b2 + bl m.seek(pos) - for p in bins: m.write(p) + for p in bins: + m.write(p) for plen in plens: # if our list gets too long, execute it diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py --- a/mercurial/sshserver.py +++ b/mercurial/sshserver.py @@ -127,7 +127,8 @@ r = impl() if r is not None: self.sendresponse(r) - else: self.sendresponse("") + else: + self.sendresponse("") return cmd != '' def _client(self): diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1605,8 +1605,10 @@ ifp.close() ofp.close() except: # re-raises - try: os.unlink(temp) - except OSError: pass + try: + os.unlink(temp) + except OSError: + pass raise return temp