From c5294defb25246d01c04462ce089a11b1c7c0c2d Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 1 Nov 2011 23:40:59 +0100 Subject: digest: support gentoken without algo --- wsgitools/digest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'wsgitools') 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)) -- cgit v1.2.3