comparison makeitso/dispatcher.py @ 18:02498337c747

* add a port * remove cruft
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 16 Nov 2010 19:44:15 -0800
parents bf1ce840d0f0
children 6d1c703c5ffc
comparison
equal deleted inserted replaced
17:941c1f73c2b6 18:02498337c747
59 else: 59 else:
60 if self.app: 60 if self.app:
61 return self.app(environ, start_response) 61 return self.app(environ, start_response)
62 handler = exc.HTTPNotFound 62 handler = exc.HTTPNotFound
63 63
64 # add navigation links to handler [example]
65 if hasattr(handler, 'data'):
66 handler.data.setdefault('links', [])
67 for h in self.handlers:
68 handler.data['links'].append((handler.link(h.handler_path),
69 h.__name__))
70
71 # get response 64 # get response
72 res = handler() 65 res = handler()
73 return res(environ, start_response) 66 return res(environ, start_response)