summaryrefslogtreecommitdiff
path: root/wsgitools
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools')
-rwxr-xr-xwsgitools/digest.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wsgitools/digest.py b/wsgitools/digest.py
index b976b9b..42abaa9 100755
--- a/wsgitools/digest.py
+++ b/wsgitools/digest.py
@@ -27,7 +27,7 @@ def gen_rand_str(bytes=33):
randstr = base64.encodestring(randstr).strip()
return randstr
-def parse_digest_response(data, ret=dict()):
+def parse_digest_response(data, ret=None):
"""internal
@raises ValueError:
@@ -48,6 +48,8 @@ def parse_digest_response(data, ret=dict()):
... print("ValueError")
ValueError
"""
+ if ret is None:
+ ret = {}
data = data.strip()
key, rest = data.split('=', 1) # raises ValueError
if rest.startswith('"'):