def worker(rpc_url): post = PING_XML % { 'url': html.escape(url), 'name': html.escape(name), } ok = False try: grab.go(rpc_url, post=post) except Exception, ex: logging.error(unicode(ex))
def worker(rpc_url): post = PING_XML % { 'url': html.escape(url), 'name': html.escape(name), } ok = False try: grab.go(rpc_url, post=post) except Exception as ex: logging.error(unicode(ex)) else: if not '<boolean>0' in grab.response.body: logging.error('%s : FAIL' % rpc_url) logging.error(grab.response.body[:1000]) else: ok = True return rpc_url, ok