From 9686dca0f62379fb26be9026a84f46ac2d96c393 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 3 Dec 2022 21:43:40 -0800 Subject: [PATCH] Avoid crash if osTicket integration is disabled --- scripts/wk/hw/diags.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/wk/hw/diags.py b/scripts/wk/hw/diags.py index 2192a62e..f1890bf2 100644 --- a/scripts/wk/hw/diags.py +++ b/scripts/wk/hw/diags.py @@ -903,6 +903,11 @@ def main() -> None: def post_system_info(state, quick_mode=False, test_mode=False) -> None: # pylint: disable=unused-argument """Post system info to osTicket.""" + # Bail early + if state.ost.disabled: + return + + # Build report report = state.system.generate_full_report() if state.disks: report.append('\n[Disks]')