mirror of
https://github.com/evennia/evennia.git
synced 2026-03-17 05:16:31 +01:00
Make sure msg(text=None) means that text should not be used (None must be converted to a string to send). Resolves #1077.
This commit is contained in:
parent
2b35140fe3
commit
00c64b10bb
2 changed files with 5 additions and 1 deletions
|
|
@ -71,7 +71,7 @@ class ContentsHandler(object):
|
|||
pks = self._pkcache
|
||||
try:
|
||||
return [self._idcache[pk] for pk in pks]
|
||||
except KeyError, err:
|
||||
except KeyError:
|
||||
# this can happen if the idmapper cache was cleared for an object
|
||||
# in the contents cache. If so we need to re-initialize and try again.
|
||||
self.init()
|
||||
|
|
|
|||
|
|
@ -188,6 +188,10 @@ class SessionHandler(dict):
|
|||
for key, data in kwargs.iteritems():
|
||||
key = _validate(key)
|
||||
if not data:
|
||||
if key == "text":
|
||||
# we don't allow sending text = None, this must mean
|
||||
# that the text command is not to be used.
|
||||
continue
|
||||
rkwargs[key] = [ [], {} ]
|
||||
elif isinstance(data, dict):
|
||||
rkwargs[key] = [ [], _validate(data) ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue