Put .strip("\n") call in the right place in modules/eval_python.py
This commit is contained in:
parent
c48574a3d6
commit
dd93a84f80
1 changed files with 2 additions and 2 deletions
|
@ -41,12 +41,12 @@ class Module(ModuleManager.BaseModule):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if page:
|
if page:
|
||||||
out = page.split("</b></span><br>", 1)[1].strip("\n")
|
out = page.split("</b></span><br>", 1)[1]
|
||||||
out = html.unescape(out)
|
out = html.unescape(out)
|
||||||
out = json.loads(out)
|
out = json.loads(out)
|
||||||
|
|
||||||
event["stdout" if out["success"] else "stderr"].write(
|
event["stdout" if out["success"] else "stderr"].write(
|
||||||
"%s: %s" % (event["user"].nickname, out["out"]))
|
"%s: %s" % (event["user"].nickname, out["out"].strip("\n")))
|
||||||
else:
|
else:
|
||||||
event["stderr"].write("%s: failed to eval" % event["user"].nickname)
|
event["stderr"].write("%s: failed to eval" % event["user"].nickname)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue