From ed5c87746c1f49acb877fcdc2565ad1521919871 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Tue, 5 Dec 2017 11:09:22 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B2=D0=B5=D0=BB=D0=B8=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=B2=D1=80=D0=B5=D0=BC=D1=8F=20=D0=B0=D0=BA?= =?UTF-8?q?=D1=82=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=D1=81=D1=82=D0=B8=20?= =?UTF-8?q?=D0=B7=D0=B0=D1=80=D0=BA=D0=B0=D0=BB=D0=B0=20=D0=B4=D0=BE=2010?= =?UTF-8?q?=20=D0=B4=D0=BD=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/calculate/lib/utils/binhosts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/calculate/lib/utils/binhosts.py b/pym/calculate/lib/utils/binhosts.py index 63ce5f4..b1cf9af 100644 --- a/pym/calculate/lib/utils/binhosts.py +++ b/pym/calculate/lib/utils/binhosts.py @@ -119,6 +119,7 @@ class BinhostsBase(object): Возвращает таймстам полученный от сервера """ DAY = 60 * 60 * 24 + OUTDATES = 10 * DAY timestamp_file = path.join(binhost, self.ts_path) try: t = time.time() @@ -126,7 +127,7 @@ class BinhostsBase(object): timeout=self.timeout).read().strip() if data.isdigit() and self.last_ts.isdigit(): return (data, int((time.time() - t) * 1000), - t - int(data) < 7 * DAY, + t - int(data) < OUTDATES, int(data) < int(self.last_ts)) except urllib2.URLError as e: pass