diff --git a/plugins/util/execute.py b/plugins/util/execute.py index b5205b4..9aecd7e 100644 --- a/plugins/util/execute.py +++ b/plugins/util/execute.py @@ -7,6 +7,10 @@ def eval_py(code, paste_multiline=True): while True: try: output = http.get("http://eval.appspot.com/eval", statement=code).rstrip('\n') + # sometimes the API returns a blank string on first attempt, lets try again + # and make sure it is actually supposed to be a blank string. ._. + if output == "": + output = http.get("http://eval.appspot.com/eval", statement=code).rstrip('\n') break except http.HTTPError: if attempts > 2: