From 35108efc5f77e04a647544fdc008f1cf20fa4753 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 30 Nov 2018 21:39:28 +0000 Subject: [PATCH] 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 --- modules/rest_api.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/rest_api.py b/modules/rest_api.py index 601eebd8..74575ff4 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -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)