~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/googlesearch/__init__.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-31 00:26:32 UTC
  • mfrom: (14606.4.19 apocaremains-2)
  • Revision ID: launchpad@pqm.canonical.com-20111231002632-67fafhhz150cct3b
[r=wgrant][no-qa] Explode canonical.lazr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from zope.interface import implements
27
27
 
28
28
from lp.services.config import config
29
 
from lp.services.webapp import urlparse
30
 
from canonical.lazr.timeout import TimeoutError
31
29
from lp.services.googlesearch.interfaces import (
32
30
    GoogleResponseError,
33
31
    GoogleWrongGSPVersion,
36
34
    ISearchService,
37
35
    )
38
36
from lp.services.timeline.requesttimeline import get_request_timeline
 
37
from lp.services.timeout import TimeoutError
 
38
from lp.services.webapp import urlparse
39
39
 
40
40
 
41
41
class PageMatch:
205
205
        :raise: `GoogleWrongGSPVersion` if the xml cannot be parsed.
206
206
        """
207
207
        search_url = self.create_search_url(terms, start=start)
208
 
        from canonical.lazr.timeout import urlfetch
 
208
        from lp.services.timeout import urlfetch
209
209
        request = get_current_browser_request()
210
210
        timeline = get_request_timeline(request)
211
211
        action = timeline.start("google-search-api", search_url)