# HG changeset patch # User Gregory Szorc # Date 1548538844 28800 # Node ID 1db94ebbc207f99c3aab504334d5f7adf03ac630 # Parent a43acfa2b76d1d52a252c9f7ea0fbbfe7ff8256f keepalive: track ready state with a bool This code may have been written before Python had a bool type. Differential Revision: https://phab.mercurial-scm.org/D5719 diff -r a43acfa2b76d -r 1db94ebbc207 mercurial/keepalive.py --- a/mercurial/keepalive.py Sat Jan 26 13:39:18 2019 -0800 +++ b/mercurial/keepalive.py Sat Jan 26 13:40:44 2019 -0800 @@ -156,7 +156,7 @@ try: for c in self._hostmap[host]: if self._readymap[c]: - self._readymap[c] = 0 + self._readymap[c] = False conn = c break finally: @@ -200,7 +200,7 @@ def _request_closed(self, request, host, connection): """tells us that this request is now closed and that the connection is ready for another request""" - self._cm.set_ready(connection, 1) + self._cm.set_ready(connection, True) def _remove_connection(self, host, connection, close=0): if close: @@ -237,7 +237,7 @@ if DEBUG: DEBUG.info("creating new connection to %s (%d)", host, id(h)) - self._cm.add(host, h, 0) + self._cm.add(host, h, False) self._start_transaction(h, req) r = h.getresponse() # The string form of BadStatusLine is the status line. Add some context