diff options
author | James Deucker <bitwisecook@users.noreply.github.com> | 2018-10-08 14:06:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 14:06:08 +0100 |
commit | 63b27ec170738d59f25557d214f8153971fa7880 (patch) | |
tree | a87990c9dfa66aea8615e68a43a261741f1d769f /python | |
parent | cd0e9cfcf63174a5dca8400a2e47d5ecebb26c4a (diff) | |
download | pycurl-63b27ec170738d59f25557d214f8153971fa7880.tar.gz |
Fix two small bugs in python/curl/__init__.py
In the `__init__` function `self.hdr` is mistyped as `self.hrd` and a mutable object (`[]`) is used in the function definition.
Diffstat (limited to 'python')
-rw-r--r-- | python/curl/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/curl/__init__.py b/python/curl/__init__.py index 9fb9171..977f3aa 100644 --- a/python/curl/__init__.py +++ b/python/curl/__init__.py @@ -34,16 +34,16 @@ else: class Curl: "High-level interface to pycurl functions." - def __init__(self, base_url="", fakeheaders=[]): + def __init__(self, base_url="", fakeheaders=None): self.handle = pycurl.Curl() # These members might be set. self.set_url(base_url) self.verbosity = 0 - self.fakeheaders = fakeheaders + self.fakeheaders = fakeheaders or [] # Nothing past here should be modified by the caller. self.payload = None self.payload_io = BytesIO() - self.hrd = "" + self.hdr = "" # Verify that we've got the right site; harmless on a non-SSL connect. self.set_option(pycurl.SSL_VERIFYHOST, 2) # Follow redirects in case it wants to take us to a CGI... |