~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2011-12-30 08:13:14 UTC
  • mto: This revision was merged to the branch mainline in revision 14611.
  • Revision ID: william.grant@canonical.com-20111230081314-f73f4ozgkzdi5xqb
More stuff.

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)