diff options
author | Helmut Grohne <helmut@subdivi.de> | 2011-11-01 23:40:59 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2011-11-01 23:40:59 +0100 |
commit | c5294defb25246d01c04462ce089a11b1c7c0c2d (patch) | |
tree | 6e08f699ecf612d4ed2d5d7f123a712715a127e9 /wsgitools/digest.py | |
parent | 6bb3c64529ab99866de5db70f06d00e2c50b30a5 (diff) | |
download | wsgitools-c5294defb25246d01c04462ce089a11b1c7c0c2d.tar.gz |
digest: support gentoken without algo
Diffstat (limited to 'wsgitools/digest.py')
-rw-r--r-- | wsgitools/digest.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wsgitools/digest.py b/wsgitools/digest.py index 7fca41c..ead4939 100644 --- a/wsgitools/digest.py +++ b/wsgitools/digest.py @@ -718,7 +718,10 @@ class AuthDigestMiddleware: algo = credentials["algorithm"] uri = credentials["uri"] nonce = credentials["nonce"] - a1h = self.gentoken(username, algo) + try: + a1h = self.gentoken(username, algo) + except TypeError: + a1h = self.gentoken(username) if a1h is None: raise ValueError a2h = self.algorithms[algo]("%s:%s" % (reqmethod, uri)) |