From a9e44a59837d997831f65a2831d3b45fcdaef47d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 27 Jul 2013 17:41:15 +0200 Subject: [PATCH] dont fail if sever is down shortly --- pandora_client/client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora_client/client.py b/pandora_client/client.py index 9d62e99..7618393 100644 --- a/pandora_client/client.py +++ b/pandora_client/client.py @@ -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)