Skip to content

Commit d497ce2

Browse files
authored
Merge pull request #590 from Martchus/retry
feat: Retry for over an hour if `osc` is not available
2 parents bc1b34a + 5364acb commit d497ce2

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ check-conventions:
7272

7373
.PHONY: check-ty
7474
check-ty: ## Run ty type checker
75-
uv run ty check
75+
ty check
7676

7777
check-code-health:
7878
@echo "Checking code health…"

_common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
errorlog=""
77
prefix="${prefix:-""}"
8-
osc="${osc:-"$prefix retry -e -- osc"}"
8+
osc=${osc:-"$prefix retry -r 11 -e -- osc"}
99
submit_target=${submit_target:-openSUSE:Factory}
1010

1111
warn() { printf '%s\n' "$@" >&2; }

check-netbox-unused-machine-power.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ def green(s: str) -> str:
8080
return f"\x1b[32m{s}\x1b[0m"
8181

8282

83-
def print_device(device: dcim.Devices, dev_pdu_power: dict[str, tuple[str, str]], watts: int) -> None:
83+
def print_device(device: dcim.Devices, dev_pdu_power: dict[tuple[str, int], tuple[int, bool]], watts: int) -> None:
8484
"""Report device power consumption per PDU outlet for human review."""
8585
s = " " if verbose else ""
86-
pdu_power = " ".join([f"{h}:{green(p) if s else red(p)}={w}W" for (h, p), (w, s) in dev_pdu_power.items()])
86+
pdu_power = " ".join([f"{h}:{green(str(p)) if s else red(str(p))}={w}W" for (h, p), (w, s) in dev_pdu_power.items()])
8787
print(f"{s}{device.name} status={device.status.value} {pdu_power}{watts}W")
8888

8989

0 commit comments

Comments
 (0)