don't attempt to msg unset report_to

This commit is contained in:
InspectorCaracal 2024-05-20 14:27:33 -06:00 committed by Cal
parent a38291f1b1
commit 379b856e2a

View file

@ -438,11 +438,12 @@ def get_and_merge_cmdsets(
cmdset for cmdset in object_cmdsets if cmdset and cmdset.key != "_EMPTY_CMDSET" cmdset for cmdset in object_cmdsets if cmdset and cmdset.key != "_EMPTY_CMDSET"
] ]
# report cmdset errors to user (these should already have been logged) # report cmdset errors to user (these should already have been logged)
yield [ if report_to:
report_to.msg(err_helper(cmdset.errmessage, cmdid=cmdid)) yield [
for cmdset in cmdsets report_to.msg(err_helper(cmdset.errmessage, cmdid=cmdid))
if cmdset.key == "_CMDSET_ERROR" for cmdset in cmdsets
] if cmdset.key == "_CMDSET_ERROR"
]
if cmdsets: if cmdsets:
# faster to do tuple on list than to build tuple directly # faster to do tuple on list than to build tuple directly