diff --git a/pym/calculate/lib/utils/binhosts.py b/pym/calculate/lib/utils/binhosts.py index 0ede1d3..a8d46b9 100644 --- a/pym/calculate/lib/utils/binhosts.py +++ b/pym/calculate/lib/utils/binhosts.py @@ -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