From 6e606ae5302f202d2ddb3b6cd69eda786a3ace28 Mon Sep 17 00:00:00 2001 From: Griatch Date: Mon, 25 Apr 2016 22:25:01 +0200 Subject: [PATCH] Fixed a bug when reporting multi-match errors in the default at_search_result with a particular input. Resolves #963. --- evennia/utils/utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/evennia/utils/utils.py b/evennia/utils/utils.py index ae67b91fd6..3b7a050a7a 100644 --- a/evennia/utils/utils.py +++ b/evennia/utils/utils.py @@ -1549,12 +1549,14 @@ def at_search_result(matches, caller, query="", quiet=False, **kwargs): error = kwargs.get("nofound_string") or _("Could not find '%s'." % query) matches = None elif len(matches) > 1: - error = kwargs.get("multimatch_string", - _("More than one match for '%s' (please narrow target):" % query)) + error = kwargs.get("multimatch_string") or \ + _("More than one match for '%s' (please narrow target):" % query) for num, result in enumerate(matches): - error += "\n %i%s%s%s" % ( + aliases = result.aliases.all() + error += "\n %i%s%s%s%s" % ( num + 1, _MULTIMATCH_SEPARATOR, result.get_display_name(caller) if hasattr(result, "get_display_name") else query, + " [%s]" % ";".join(aliases) if aliases else "", result.get_extra_info(caller)) matches = None else: