Converted msg-arguments to options
This commit is contained in:
parent
cd8651c740
commit
8448b513e1
6 changed files with 25 additions and 21 deletions
|
|
@ -114,7 +114,7 @@ def _msg_err(receiver, string):
|
|||
string (str): string which will be shown to the user.
|
||||
|
||||
"""
|
||||
receiver.msg(string.format(_nomulti=True, timestamp=logger.timeformat()).strip())
|
||||
receiver.msg(string.format(timestamp=logger.timeformat()).strip())
|
||||
|
||||
|
||||
# custom Exceptions
|
||||
|
|
@ -570,12 +570,12 @@ def cmdhandler(called_by, raw_string, _testing=False, callertype="session", sess
|
|||
returnValue(ret)
|
||||
elif sysarg:
|
||||
# return system arg
|
||||
error_to.msg(exc.sysarg, _nomulti=True)
|
||||
error_to.msg(exc.sysarg)
|
||||
|
||||
except NoCmdSets:
|
||||
# Critical error.
|
||||
logger.log_err("No cmdsets found: %s" % caller)
|
||||
error_to.msg(_ERROR_NOCMDSETS, _nomulti=True)
|
||||
error_to.msg(_ERROR_NOCMDSETS)
|
||||
|
||||
except Exception:
|
||||
# We should not end up here. If we do, it's a programming bug.
|
||||
|
|
|
|||
|
|
@ -1512,7 +1512,7 @@ class CmdSetAttribute(ObjManipCommand):
|
|||
continue
|
||||
string += self.view_attr(obj, attr)
|
||||
# we view it without parsing markup.
|
||||
self.caller.msg(string.strip(), raw=True)
|
||||
self.caller.msg(string.strip(), options={"raw":True})
|
||||
return
|
||||
else:
|
||||
# deleting the attribute(s)
|
||||
|
|
|
|||
|
|
@ -176,9 +176,9 @@ class CmdPy(MuxCommand):
|
|||
'inherits_from': utils.inherits_from}
|
||||
|
||||
try:
|
||||
self.msg(">>> %s" % pycode, raw=True, session=self.session)
|
||||
self.msg(">>> %s" % pycode, session=self.session, options={"raw":True})
|
||||
except TypeError:
|
||||
self.msg(">>> %s" % pycode, raw=True)
|
||||
self.msg(">>> %s" % pycode, options={"raw":True})
|
||||
|
||||
mode = "eval"
|
||||
try:
|
||||
|
|
@ -207,9 +207,9 @@ class CmdPy(MuxCommand):
|
|||
ret = "\n".join("%s" % line for line in errlist if line)
|
||||
|
||||
try:
|
||||
self.msg(ret, session=self.session, raw=True)
|
||||
self.msg(ret, session=self.session, options={"raw":True})
|
||||
except TypeError:
|
||||
self.msg(ret, raw=True)
|
||||
self.msg(ret, options={"raw":True})
|
||||
|
||||
|
||||
# helper function. Kept outside so it can be imported and run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue