added level update val to binhost

master
idziubenko 3 years ago
parent 8ceff4f56e
commit faff9f9f1b

@ -172,6 +172,20 @@ class BinhostsBase(Cachable):
self.duration = int((time.time() - start_ts) * 1000)
self.outdated = int(start_ts) - self.timestamp > parent.actual_period
self.downgraded = self.timestamp < parent.last_ts
fn, data = self.parent.fetch_envdata(self.host)
if fn:
cp = ConfigParserCaseSens()
try:
cp.read_string(data)
if "update" in cp.sections():
self.level = cp["update"]["level"]
else:
self.level = 99999
except (CPError, KeyError) as e:
self.level = 99999
else:
self.level = 99999
except BaseException as e:
if isinstance(e, KeyboardInterrupt):
raise

Loading…
Cancel
Save