Skip to content

Commit

Permalink
Add kind to RaceSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed May 3, 2023
1 parent b3aae5e commit 30a3a34
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gobexec/goblint/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ def __init__(self,
def template(self, env):
return env.get_template("racesummary.jinja")

@property
def kind(self):
if self.unsafe > 0:
return ResultKind.ERROR
elif self.vulnerable > 0:
return ResultKind.WARNING
else:
return ResultKind.SUCCESS

@staticmethod
async def extract(ec: ExecutionContext[Any], cp: CompletedSubprocess) -> 'RaceSummary':
stdout = cp.stdout.decode("utf-8")
Expand Down

0 comments on commit 30a3a34

Please sign in to comment.