Skip to content

Commit

Permalink
Minor refactoring of Nodel.problems().
Browse files Browse the repository at this point in the history
  • Loading branch information
john-hen committed Oct 27, 2021
1 parent bb89e91 commit fdb9e2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mph/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,14 @@ def problems(self):
stack = []
if hasattr(java, 'problem'):
for tag in java.problem().tags():
stack.append( (self, java.problem(tag)) )
stack.append(java.problem(tag))
items = []
while stack:
(node, problem) = stack.pop()
problem = stack.pop()
item = {
'message': '',
'category': '',
'node': node,
'node': self,
'selection': '',
}
if hasattr(problem, 'message'):
Expand All @@ -333,7 +333,7 @@ def problems(self):
items.append(item)
if hasattr(problem, 'problem'):
for tag in problem.problem().tags():
stack.append( (node, problem.problem(tag)) )
stack.append(problem.problem(tag))
for child in self.children():
items += child.problems()
return items
Expand Down

0 comments on commit fdb9e2b

Please sign in to comment.