~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/timeline/requesttimeline.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-10 01:48:28 UTC
  • mfrom: (13643.1.1 usetimeline)
  • Revision ID: launchpad@pqm.canonical.com-20110810014828-9gaxl6zrcg32y4nk
[r=lifeless][no-qa] Use the factored out timeline package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
__metaclass__ = type
12
12
 
 
13
from timeline import Timeline
 
14
 
13
15
# XXX RobertCollins 2010-09-01 bug=623199: Undesirable but pragmatic.
14
16
# Because of this bug, rather than using request.annotations we have
15
17
# to work in with the webapp.adapter request model, which is 
16
18
# different to that used by get_current_browser_request.
17
19
from canonical.launchpad import webapp
18
 
from timeline import Timeline
19
20
 
20
21
 
21
22
def get_request_timeline(request):
27
28
    request annotations.
28
29
 
29
30
    :param request: A zope/launchpad request object.
30
 
    :return: A lp.services.timeline.timeline.Timeline object for the request.
 
31
    :return: A timeline.timeline.Timeline object for the request.
31
32
    """
32
33
    try:
33
34
        return webapp.adapter._local.request_timeline