def addData(source): try: trig = (yield fetch(source)).body except AttributeError: print vars() raise try: g.addN(parseTrig(trig)) except Exception: import traceback print "fetching %s:" % source traceback.print_exc()
def done(trig, uri): g.addN(parseTrig(trig)) print "%s done in %.02fms" % (uri, 1000 * (time.time() - startTime))