From 4cf3b4e4cb2cc32b49c02c4ff276849eced8dffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD=20=D0=94=D0=B7=D1=8E=D0=B1=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= Date: Thu, 28 Oct 2021 17:35:15 +0300 Subject: [PATCH] added level check to binhost --- pym/calculate/lib/utils/binhosts.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pym/calculate/lib/utils/binhosts.py b/pym/calculate/lib/utils/binhosts.py index a8d46b9..4fd3461 100644 --- a/pym/calculate/lib/utils/binhosts.py +++ b/pym/calculate/lib/utils/binhosts.py @@ -179,13 +179,17 @@ class BinhostsBase(Cachable): try: cp.read_string(data) if "update" in cp.sections(): - self.level = cp["update"]["level"] + self.level = int(cp["update"]["level"]) + + #TODO this is for debugging + # self.level = 2 + else: - self.level = 99999 + self.level = None except (CPError, KeyError) as e: - self.level = 99999 + self.level = None else: - self.level = 99999 + self.level = None except BaseException as e: if isinstance(e, KeyboardInterrupt): raise