Fix how the lock command returns strings to avoid a malformed AMP send. This (again fixes ##996.

This commit is contained in:
Griatch 2016-06-15 21:33:05 +02:00
parent 1a30079fd4
commit 6a160b4204
2 changed files with 2 additions and 0 deletions

View file

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

View file

@ -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,