Avoid crash if osTicket integration is disabled

This commit is contained in:
2Shirt 2022-12-03 21:43:40 -08:00
parent 60168e14ae
commit 9686dca0f6
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -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]')