Skip to content

Commit

Permalink
fix, now it does not do that. (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva authored Jul 27, 2023
1 parent 8ae69d2 commit 103e94e
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 103e94e

Please sign in to comment.