summaryrefslogtreecommitdiff
path: root/wsgitools
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2010-01-31 02:30:10 +0100
committerHelmut Grohne <helmut@subdivi.de>2010-01-31 02:30:10 +0100
commitb284167efc3184effb5685cd71196defcf77a3fc (patch)
tree45f173338b41c7706e122cbd0a32ed3f79904fbf /wsgitools
parent0965b23dd9ad8f393ddd2e3f0c42977a1289bec1 (diff)
downloadwsgitools-b284167efc3184effb5685cd71196defcf77a3fc.tar.gz
fix shared default argument to parse_digest_response
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('"'):