# HG changeset patch # User Pierre-Yves David # Date 2017-03-15 06:49:25 # Node ID a53f2d4c734f403a7237867e8f8ff5cdc6c5b369 # Parent 86dfd31c03299fdfc9d2a65dd9a1ab378b94613a httpclient: don't use mutable default argument value Caught by pylint. diff --git a/mercurial/httpclient/__init__.py b/mercurial/httpclient/__init__.py --- a/mercurial/httpclient/__init__.py +++ b/mercurial/httpclient/__init__.py @@ -631,7 +631,7 @@ class HTTPConnection(object): self.close() self._connect(pheaders) - def request(self, method, path, body=None, headers={}, + def request(self, method, path, body=None, headers=None, expect_continue=False): """Send a request to the server. @@ -642,6 +642,8 @@ class HTTPConnection(object): available. Use the `getresponse()` method to retrieve the response. """ + if headers is None: + headers = {} method = _ensurebytes(method) path = _ensurebytes(path) if self.busy():