All pastes #466049 Raw Edit

Something

public text v1 · immutable
#466049 ·published 2007-04-30 19:41 UTC
rendered paste body
    def _getTaskList(self, id):
        try:
            tl = TaskList.get(int(id))
            assert tl.project == c.project, (
                "requested list %r doesn't match current project %r"
                % (tl, c.project))
            assert tl.live, (
                "Task %r not live" % tl)
            return tl
        except LookupError, AssertionError:
            if request.environ.get("HTTP_REFERER"):
                pass
            else:
                raise paste.httpexceptions.HTTPNotFound("Tasklist %d could not be found." % id)