dont fail if sever is down shortly

This commit is contained in:
j 2013-07-27 17:41:15 +02:00
parent 2500adde4b
commit a9e44a5983

View File

@ -18,8 +18,11 @@ class DistributedClient:
self.name = name
def ping(self, oshash):
url = '%s/ping/%s/%s' % (self.url, oshash, self.name)
requests.get(url)
try:
url = '%s/ping/%s/%s' % (self.url, oshash, self.name)
requests.get(url)
except:
print 'cound not ping server'
def status(self, oshash, status):
url = '%s/status/%s' % (self.url, oshash)