mirror of
https://github.com/house-of-vanity/conf_bot.git
synced 2025-07-06 14:24:08 +00:00
Improve logging.
This commit is contained in:
@ -30,6 +30,7 @@ class RequestHandler(SimpleHTTPRequestHandler):
|
||||
|
||||
length = self.headers.get('content-length')
|
||||
post_body = self.rfile.read(int(length))
|
||||
print(post_body)
|
||||
msg = json.loads(post_body.decode("utf-8"))
|
||||
self.worker.handleUpdate(msg)
|
||||
|
||||
@ -56,6 +57,8 @@ class WebHook:
|
||||
self.httpd.serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except Exception as e:
|
||||
print("ERROR: %s" % e)
|
||||
finally:
|
||||
# Clean-up server (close socket, etc.)
|
||||
self.httpd.server_close()
|
||||
|
Reference in New Issue
Block a user