Merge pull request #3545 from InspectorCaracal/patch-28
Fix cmdhandler error-handling issues
This commit is contained in:
commit
2f3a882984
1 changed files with 7 additions and 6 deletions
|
|
@ -350,7 +350,7 @@ def get_and_merge_cmdsets(
|
||||||
"""
|
"""
|
||||||
# Gather cmdsets from location, objects in location or carried
|
# Gather cmdsets from location, objects in location or carried
|
||||||
try:
|
try:
|
||||||
local_obj_cmdsets = [None]
|
local_obj_cmdsets = []
|
||||||
try:
|
try:
|
||||||
location = obj.location
|
location = obj.location
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue