aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-24 13:50:50 +0100
committerGravatar jesopo2018-10-24 13:50:50 +0100
commit46179d2f3815c74d094567cea04854ab6e723600 (patch)
treeb22a997e238fa2dfbf46e498d588c9ccb1cacfdb
parentSpecifically catch SyntaxError in modules/eval_python.py (diff)
signature
There's no `self` in eval_python's template!
-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 d514edfd..963f43bd 100644
--- a/modules/eval_python.py
+++ b/modules/eval_python.py
@@ -11,7 +11,7 @@ def fail(s):
try:
compiled = compile(sys.stdin.read(), "code", "single")
except SyntaxError as e:
- self.fail(str(e))
+ fail(str(e))
old_stdout = sys.stdout
stdout = io.StringIO()
@@ -20,7 +20,7 @@ sys.stdout = stdout
try:
result = eval(compiled)
except Exception as e:
- self.fail(str(e))
+ fail(str(e))
stdout.write("\\n")
if not result == None: