mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 15:37:17 +02:00
Fixed a ZeroDivionError by adjusting what is returned by aliashandler.all() when no aliases are given ([] instead of ['']). Also made sure src.utils.stringsuggestions() don't crash in such a situation.
This commit is contained in:
parent
a1646ec596
commit
55423f6a2f
4 changed files with 9 additions and 7 deletions
|
|
@ -316,7 +316,6 @@ def cmdhandler(called_by, raw_string, testing=False, callertype="session", sessi
|
|||
else:
|
||||
# fallback to default error text
|
||||
sysarg = _("Command '%s' is not available.") % raw_string
|
||||
cmdset.get_all_cmd_keys_and_aliases(caller)
|
||||
suggestions = string_suggestions(raw_string, cmdset.get_all_cmd_keys_and_aliases(caller), cutoff=0.7, maxnum=3)
|
||||
if suggestions:
|
||||
sysarg += _(" Maybe you meant %s?") % utils.list_to_string(suggestions, _('or'), addquote=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue