mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 00:06:30 +01:00
Move COMMAND_NESTING safety handler into try..except..finally clause to avoid it ticking up accidentally due to the loop exiting from a traceback.
This commit is contained in:
parent
2ed92e8149
commit
17ee28ab6c
1 changed files with 3 additions and 1 deletions
|
|
@ -472,7 +472,6 @@ def cmdhandler(called_by, raw_string, _testing=False, callertype="session", sess
|
|||
caller.ndb.last_cmd = yield copy(cmd)
|
||||
else:
|
||||
caller.ndb.last_cmd = None
|
||||
_COMMAND_NESTING[called_by] -= 1
|
||||
|
||||
# return result to the deferred
|
||||
returnValue(ret)
|
||||
|
|
@ -480,6 +479,9 @@ def cmdhandler(called_by, raw_string, _testing=False, callertype="session", sess
|
|||
except Exception:
|
||||
_msg_err(caller, _ERROR_UNTRAPPED)
|
||||
raise ErrorReported
|
||||
finally:
|
||||
_COMMAND_NESTING[called_by] -= 1
|
||||
|
||||
|
||||
raw_string = to_unicode(raw_string, force_string=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue