Skip to content

Commit

Permalink
fix, now it does not do that.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Jul 23, 2023
1 parent 0762763 commit b7c98fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sarracenia/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ def _resolve(self):

self.states[c][cfg]['metrics'] = metrics

if len(self.states[c][cfg]['instance_pids']) >= 0:
if ('instance_pids' in self.states[c][cfg]) and (len(self.states[c][cfg]['instance_pids']) >= 0):
self.states[c][cfg]['missing_instances'] = []
self.states[c][cfg]['hung_instances'] = []
observed_instances = 0
Expand Down Expand Up @@ -2242,7 +2242,7 @@ def status(self):
line += " %8s %7s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s" % \
( "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-" )

if (len(self.states[c][cfg]['instance_pids']) >= 0) and ('resource_usage' in self.states[c][cfg]):
if ('instance_pids' in self.states[c][cfg]) and (len(self.states[c][cfg]['instance_pids']) >= 0) and ('resource_usage' in self.states[c][cfg]):
ru = self.states[c][cfg]['resource_usage']


Expand Down

0 comments on commit b7c98fd

Please sign in to comment.