From 6a160b4204e8c6136d4b33025a116887116f1f30 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 15 Jun 2016 21:33:05 +0200 Subject: [PATCH] Fix how the lock command returns strings to avoid a malformed AMP send. This (again fixes ##996. --- evennia/commands/cmdhandler.py | 1 + evennia/utils/utils.py | 1 + 2 files changed, 2 insertions(+) diff --git a/evennia/commands/cmdhandler.py b/evennia/commands/cmdhandler.py index 9e35f43ba..9986bb2ab 100644 --- a/evennia/commands/cmdhandler.py +++ b/evennia/commands/cmdhandler.py @@ -534,6 +534,7 @@ def cmdhandler(called_by, raw_string, _testing=False, callertype="session", sess syscmd.matches = matches else: # fall back to default error handling + print "matches:", matches sysarg = yield _SEARCH_AT_RESULT([match[2] for match in matches], caller, query=match[0]) raise ExecSystemCommand(syscmd, sysarg) diff --git a/evennia/utils/utils.py b/evennia/utils/utils.py index 3c81c8378..d4eb790df 100644 --- a/evennia/utils/utils.py +++ b/evennia/utils/utils.py @@ -1555,6 +1555,7 @@ def at_search_result(matches, caller, query="", quiet=False, **kwargs): error = kwargs.get("multimatch_string") or \ _("More than one match for '%s' (please narrow target):" % query) for num, result in enumerate(matches): + print ("matches:", result, result.aliases) aliases = result.aliases.all() error += "\n %i%s%s%s%s" % ( num + 1, _MULTIMATCH_SEPARATOR,