Exemplo n.º 1
0
 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))
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
Arquivo: ping.py Projeto: subeax/grab
 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
Exemplo n.º 4
0
 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