rest_api.py's '_safe_handle' function isn't used and doesn't need to be used now

that API calls are thrown straight on to the main thread
This commit is contained in:
jesopo 2018-11-30 21:39:28 +00:00
parent aab84096fd
commit 35108efc5f

View file

@ -54,14 +54,6 @@ class Handler(http.server.BaseHTTPRequestHandler):
self.send_header("Content-type", "application/json")
self.end_headers()
self.wfile.write(response.encode("utf8"))
def _safe_handle(self, method, path, params):
_bot.lock.acquire()
try:
self._handle(method, path, params)
except:
pass
finally:
_bot.lock.release()
def _decode_params(self, s):
params = urllib.parse.parse_qs(s)