Avoid crash if osTicket integration is disabled
This commit is contained in:
parent
60168e14ae
commit
9686dca0f6
1 changed files with 5 additions and 0 deletions
|
|
@ -903,6 +903,11 @@ def main() -> None:
|
||||||
def post_system_info(state, quick_mode=False, test_mode=False) -> None:
|
def post_system_info(state, quick_mode=False, test_mode=False) -> None:
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
"""Post system info to osTicket."""
|
"""Post system info to osTicket."""
|
||||||
|
# Bail early
|
||||||
|
if state.ost.disabled:
|
||||||
|
return
|
||||||
|
|
||||||
|
# Build report
|
||||||
report = state.system.generate_full_report()
|
report = state.system.generate_full_report()
|
||||||
if state.disks:
|
if state.disks:
|
||||||
report.append('\n[Disks]')
|
report.append('\n[Disks]')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue