aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-17 17:31:59 +0100
committerGravatar jesopo2018-10-17 17:31:59 +0100
commitdd93a84f8037ef3e88781673673b7670ad45096c (patch)
tree8f57bf3f72e0e525db179199de1b326564f1306f /modules
parent"Cannot" -> "can't" in IRCServer encoding fallback (diff)
signature
Put .strip("\n") call in the right place in modules/eval_python.py
Diffstat (limited to 'modules')
-rw-r--r--modules/eval_python.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/eval_python.py b/modules/eval_python.py
index 5a62f5be..13361e42 100644
--- a/modules/eval_python.py
+++ b/modules/eval_python.py
@@ -41,12 +41,12 @@ class Module(ModuleManager.BaseModule):
pass
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 = json.loads(out)
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:
event["stderr"].write("%s: failed to eval" % event["user"].nickname)