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:
parent
aab84096fd
commit
35108efc5f
1 changed files with 0 additions and 8 deletions
|
@ -54,14 +54,6 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||||
self.send_header("Content-type", "application/json")
|
self.send_header("Content-type", "application/json")
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
self.wfile.write(response.encode("utf8"))
|
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):
|
def _decode_params(self, s):
|
||||||
params = urllib.parse.parse_qs(s)
|
params = urllib.parse.parse_qs(s)
|
||||||
|
|
Loading…
Reference in a new issue