Lynn Rees  committed 6c09ab6


  • Participants
  • Parent commits 9cd4402
  • Branches wsgiauth

Comments (0)

Files changed (1)

File trunk/wsgiauth/

 import re
 from openid.consumer import consumer
 from openid.oidutil import appendArgs
-from util import request_uri, Redirect, NotFound
+from util import request_uri, Redirect, NotFound, Response
 TEMPLATE = '''<html>
   <head><title>OpenID Form</title></head>
                 return self.verify(environ, start_response)
             elif path == '/process':
                 return self.process(environ, start_response)
-            else:
-                notfound = self.notfound(environ['openid.parsed_uri'])
-                return notfound(environ, start_response)
+            notfound = self.notfound(environ['openid.parsed_uri'])
+            return notfound(environ, start_response)
             if self.catch_401: return self.catch401(environ, start_response)
             return self.applcation(environ, start_response)
                 was401 = True
                 def dummy_writer(v): pass
                 return dummy_writer
-            else:
-                return start_response(status, headers, exc_info)
+            return start_response(status, headers, exc_info)
         result = self.application(environ, catch_response)
         if was401:
             redir = self.redirect(request_uri(environ, False, False))
     def build_url(self, environ, action, **query):
         '''Build a URL relative to the server base_url, with the given
         query parameters added.'''
-        base = urlparse.urljoin(environ['openid.base_url'], self.auth_prefix + '/' + action)
+        base = urlparse.urljoin(environ['openid.base_url'],
+                self.auth_prefix + '/' + action)
         return appendArgs(base, query)