On Fri, Feb 15, 2008 at 12:39 PM, Luis Bruno <[EMAIL PROTECTED]> wrote: > > Please, someone apply the "patch" below, hmmkay? Can't be arsed to find > a "diff" to install in my Windows box. Thank you. > > > class BasicUserSetter(AuthKitUserSetter): > def __init__(self, application, realm, authfunc, users): > self.application = application > self.users = users > self.authenticate = AuthBasicAuthenticator(realm, authfunc) > > def __call__(self, environ, start_response): > environ['authkit.users'] = self.users > result = self.authenticate(environ) > if isinstance(result, str): > AUTH_TYPE.update(environ, 'basic') > REMOTE_USER.update(environ, result) > + elif isinstance(result, HTTPUnauthorized): > + return result.wsgi_application(environ, start_response) > return self.application(environ, start_response)
How can result be a HTTPUnauthorized instance if it's a str instance? BTW this code does not work if result is a unicode object. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
