Various tweaks
This commit is contained in:
parent
6bb9819501
commit
61752baa24
3 changed files with 14 additions and 2 deletions
|
@ -7,13 +7,13 @@ def eval_py(code, paste_multiline=True):
|
|||
while True:
|
||||
try:
|
||||
output = http.get("http://eval.appspot.com/eval", statement=code).rstrip('\n')
|
||||
break
|
||||
except http.HTTPError:
|
||||
if attempts > 2:
|
||||
return "Failed to execute code."
|
||||
else:
|
||||
attempts += 1
|
||||
continue
|
||||
break
|
||||
|
||||
if "Traceback (most recent call last):" in output:
|
||||
status = "Python error: "
|
||||
|
|
Reference in a new issue