[PATCH STABLE] http: work around custom http client classes that refuse extra attrs
Yuya Nishihara
yuya at tcha.org
Tue Oct 30 07:42:51 EDT 2018
On Mon, 29 Oct 2018 16:28:03 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1540844622 14400
> # Mon Oct 29 16:23:42 2018 -0400
> # Branch stable
> # Node ID 588f1e9a4d1665b8dc02ab409312f59d06414d02
> # Parent 7e4ffe2719e4af2a9e56c9ee097ed6720f5c3906
> http: work around custom http client classes that refuse extra attrs
Seems fine. Queued for stable, thanks.
> --- a/mercurial/keepalive.py
> +++ b/mercurial/keepalive.py
> @@ -442,7 +442,10 @@ class HTTPResponse(httplib.HTTPResponse)
> data = self._raw_read(amt)
>
> self.receivedbytescount += len(data)
> - self._connection.receivedbytescount += len(data)
> + try:
> + self._connection.receivedbytescount += len(data)
> + except AttributeError:
> + pass
There are two more self._connection.receivedbytescount in keepalive.py.
More information about the Mercurial-devel
mailing list