Removed the <<< markers in @py output since they conflicted with MXP parsing in clients like Mushclient (@py strings must be sent raw, so won't go through the MXP parser)
This commit is contained in:
parent
9b37944b38
commit
aab16041d4
1 changed files with 3 additions and 3 deletions
|
|
@ -197,14 +197,14 @@ class CmdPy(MuxCommand):
|
||||||
else:
|
else:
|
||||||
ret = eval(pycode_compiled, {}, available_vars)
|
ret = eval(pycode_compiled, {}, available_vars)
|
||||||
if mode == "eval":
|
if mode == "eval":
|
||||||
ret = "<<< %s%s" % (str(ret), duration)
|
ret = "%s%s" % (str(ret), duration)
|
||||||
else:
|
else:
|
||||||
ret = "<<< Done (use self.msg() if you want to catch output)%s" % duration
|
ret = " Done (use self.msg() if you want to catch output)%s" % duration
|
||||||
except Exception:
|
except Exception:
|
||||||
errlist = traceback.format_exc().split('\n')
|
errlist = traceback.format_exc().split('\n')
|
||||||
if len(errlist) > 4:
|
if len(errlist) > 4:
|
||||||
errlist = errlist[4:]
|
errlist = errlist[4:]
|
||||||
ret = "\n".join("<<< %s" % line for line in errlist if line)
|
ret = "\n".join("%s" % line for line in errlist if line)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.msg(ret, session=self.session, raw=True)
|
self.msg(ret, session=self.session, raw=True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue