mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 00:50:10 +01:00
crnm: default wo coloring when unknown GitLab job status
When GitLab adds new job statuses, we need to upgrade the coloring dictionary. By having a default value for non-colored output, we handle future unknown status, and avoid crashes. Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38919>
This commit is contained in:
parent
d75f5e0add
commit
c5f5b6b78d
1 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ REFRESH_WAIT_LOG = 10
|
|||
REFRESH_WAIT_JOBS = 6
|
||||
MAX_ENABLE_JOB_ATTEMPTS = 3
|
||||
|
||||
STATUS_COLORS = {
|
||||
STATUS_COLORS = defaultdict(lambda: "", {
|
||||
"created": "",
|
||||
"running": "[blue]",
|
||||
"success": "[green]",
|
||||
|
|
@ -55,7 +55,7 @@ STATUS_COLORS = {
|
|||
"manual": "",
|
||||
"pending": "",
|
||||
"skipped": "",
|
||||
}
|
||||
})
|
||||
|
||||
COMPLETED_STATUSES = frozenset({"success", "failed"})
|
||||
RUNNING_STATUSES = frozenset({"created", "pending", "running"})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue