diff options
author | ianb <devnull@localhost> | 2006-08-21 22:48:39 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2006-08-21 22:48:39 +0000 |
commit | de49f36ca941b08127c31c1d711edd07d3a0f471 (patch) | |
tree | 6ee3fad45ac4d5e3d22bc4dc02fd5de0c574e47a /paste/auth | |
parent | 9b0705d2e06508af198cd4c1ad9504073918611b (diff) | |
download | paste-de49f36ca941b08127c31c1d711edd07d3a0f471.tar.gz |
better error message in paste.auth.cookie
Diffstat (limited to 'paste/auth')
-rw-r--r-- | paste/auth/cookie.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/paste/auth/cookie.py b/paste/auth/cookie.py index 8dede14..b4ed0b4 100644 --- a/paste/auth/cookie.py +++ b/paste/auth/cookie.py @@ -275,6 +275,11 @@ class AuthCookieHandler: for k in scanlist: v = environ.get(k,None) if v is not None: + if type(v) is not str: + raise ValueError( + "The value of the environmental variable %r " + "is not a str (only str is allowed; got %r)" + % (k, v)) content.append("%s=%s" % (encode(k),encode(v))) if content: content = ";".join(content) |