(self, environ, start_response)
| 41 | self.views = views |
| 42 | |
| 43 | def __call__(self, environ, start_response): |
| 44 | try: |
| 45 | req = Request(environ) |
| 46 | for regex, view in self.urls: |
| 47 | match = regex.match(req.path) |
| 48 | if match is not None: |
| 49 | view = self.views[view](self, req) |
| 50 | if req.method not in ("GET", "HEAD", "POST", "DELETE", "PUT"): |
| 51 | raise NotImplemented() # noqa: F901 |
| 52 | resp = getattr(view, req.method)(*match.groups()) |
| 53 | break |
| 54 | else: |
| 55 | raise NotFound() |
| 56 | except HTTPException as e: |
| 57 | resp = e |
| 58 | return resp(environ, start_response) |
nothing calls this directly
no test coverage detected