Fixed a lingering wrong use of msg kwarg.
This commit is contained in:
parent
8448b513e1
commit
67b84c2431
1 changed files with 6 additions and 5 deletions
|
|
@ -298,7 +298,7 @@ class Command(with_metaclass(CommandMeta, object)):
|
||||||
"""
|
"""
|
||||||
return self.lockhandler.check(srcobj, access_type, default=default)
|
return self.lockhandler.check(srcobj, access_type, default=default)
|
||||||
|
|
||||||
def msg(self, msg="", to_obj=None, from_obj=None,
|
def msg(self, text=None, to_obj=None, from_obj=None,
|
||||||
session=None, **kwargs):
|
session=None, **kwargs):
|
||||||
"""
|
"""
|
||||||
This is a shortcut instad of calling msg() directly on an
|
This is a shortcut instad of calling msg() directly on an
|
||||||
|
|
@ -306,15 +306,16 @@ class Command(with_metaclass(CommandMeta, object)):
|
||||||
also appends self.session automatically.
|
also appends self.session automatically.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (str, optional): Text string of message to send.
|
text (str, optional): Text string of message to send.
|
||||||
to_obj (Object, optional): Target object of message. Defaults to self.caller.
|
to_obj (Object, optional): Target object of message. Defaults to self.caller.
|
||||||
from_obj (Object, optional): Source of message. Defaults to to_obj.
|
from_obj (Object, optional): Source of message. Defaults to to_obj.
|
||||||
session (Session, optional): Supply data only to a unique
|
session (Session, optional): Supply data only to a unique
|
||||||
session.
|
session.
|
||||||
|
|
||||||
Kwargs:
|
Kwargs:
|
||||||
kwargs (any): These are all passed on to the message mechanism. Common
|
options (dict): Options to the protocol.
|
||||||
keywords are `oob` and `raw`.
|
any (any): All other keywords are interpreted as th
|
||||||
|
name of send-instructions.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from_obj = from_obj or self.caller
|
from_obj = from_obj or self.caller
|
||||||
|
|
@ -324,7 +325,7 @@ class Command(with_metaclass(CommandMeta, object)):
|
||||||
session = self.session
|
session = self.session
|
||||||
else:
|
else:
|
||||||
session = to_obj.sessions.get()
|
session = to_obj.sessions.get()
|
||||||
to_obj.msg(msg, from_obj=from_obj, session=session, **kwargs)
|
to_obj.msg(text=text, from_obj=from_obj, session=session, **kwargs)
|
||||||
|
|
||||||
# Common Command hooks
|
# Common Command hooks
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue