From 24aed0098db7959c087685bd6030e7b856e08869 Mon Sep 17 00:00:00 2001 From: 0xDEADFED5 Date: Sat, 8 Feb 2025 20:34:13 -0800 Subject: [PATCH] assume that _run_command doesn't return Deferred --- evennia/commands/cmdhandler.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/evennia/commands/cmdhandler.py b/evennia/commands/cmdhandler.py index 2fbeebd9a5..b8332189d3 100644 --- a/evennia/commands/cmdhandler.py +++ b/evennia/commands/cmdhandler.py @@ -646,9 +646,6 @@ def cmdhandler( else: caller.ndb.last_cmd = None - # return result to the deferred - return ret - except InterruptCommand: # Do nothing, clean exit pass @@ -757,10 +754,9 @@ def cmdhandler( cmd = copy(cmd) # A normal command. - ret = yield _run_command( + yield _run_command( cmd, cmdname, args, raw_cmdname, cmdset, session, account, cmdset_providers ) - return ret except ErrorReported as exc: # this error was already reported, so we @@ -774,7 +770,7 @@ def cmdhandler( sysarg = exc.sysarg if syscmd: - ret = yield _run_command( + yield _run_command( syscmd, syscmd.key, sysarg, @@ -784,7 +780,7 @@ def cmdhandler( account, cmdset_providers, ) - return ret + return elif sysarg: # return system arg error_to.msg(err_helper(exc.sysarg, cmdid=cmdid))