summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJames Deucker <bitwisecook@users.noreply.github.com>2018-10-08 14:06:08 +0100
committerGitHub <noreply@github.com>2018-10-08 14:06:08 +0100
commit63b27ec170738d59f25557d214f8153971fa7880 (patch)
treea87990c9dfa66aea8615e68a43a261741f1d769f /python
parentcd0e9cfcf63174a5dca8400a2e47d5ecebb26c4a (diff)
downloadpycurl-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__.py6
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...