diff options
author | Helmut Grohne <helmut@subdivi.de> | 2010-01-31 02:30:10 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2010-01-31 02:30:10 +0100 |
commit | b284167efc3184effb5685cd71196defcf77a3fc (patch) | |
tree | 45f173338b41c7706e122cbd0a32ed3f79904fbf /wsgitools/digest.py | |
parent | 0965b23dd9ad8f393ddd2e3f0c42977a1289bec1 (diff) | |
download | wsgitools-b284167efc3184effb5685cd71196defcf77a3fc.tar.gz |
fix shared default argument to parse_digest_response
Diffstat (limited to 'wsgitools/digest.py')
-rwxr-xr-x | wsgitools/digest.py | 4 |
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('"'): |