MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / run_failed

Method run_failed

vulnerabilities/models.py:2098–2115  ·  view source on GitHub ↗

Return True if the execution failed.

(self)

Source from the content-addressed store, hash-verified

2096
2097 @property
2098 def run_failed(self):
2099 """Return True if the execution failed."""
2100 fail_exitcode = self.run_exitcode and self.run_exitcode > 0
2101
2102 if not fail_exitcode:
2103 with suppress(redis.exceptions.ConnectionError, AttributeError):
2104 job = self.job
2105 if job.is_failed:
2106 # Job was killed externally.
2107 end_date = job.ended_at.replace(tzinfo=datetime.timezone.utc)
2108 self.set_run_ended(
2109 exitcode=1,
2110 output=f"Killed from outside, exc_info={job.exc_info}",
2111 end_date=end_date,
2112 )
2113 return True
2114
2115 return fail_exitcode
2116
2117 @property
2118 def run_stopped(self):

Callers

nothing calls this directly

Calls 1

set_run_endedMethod · 0.95

Tested by

no test coverage detected