Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use search collector's error handler to transform results.

Instead of having the error handler directly call the success handler,
just use the normal errback mechanism of error handling to translate
the error into success.
  • Loading branch information...
commit 36938df967f3b6e2851c64a7c8cf7370fd32b16e 1 parent cef3809
@dustin authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/twitterspy/
10 lib/twitterspy/
@@ -20,12 +20,12 @@ def gotResult(self, entry):
).replace(">", ">"
).replace('&', '&')
html="<a href='%s'>%s</a>: %s" % (, u, hcontent)
+ def errHandler(e):
+ log.err(e)
+ return plain, html
def saveResults(t):
p, h = t
bisect.insort(self.results, (eid, p, h))
- def errHandler(e):
- log.err(e)
- saveResults((plain, html))
- d = url_expansion.expander.expand(plain, html).addCallback(
- saveResults).addErrback(errHandler)
+ d = url_expansion.expander.expand(plain, html).addErrback(
+ errHandler).addCallback(saveResults)
Please sign in to comment.
Something went wrong with that request. Please try again.