Commit 1cb18fd2 authored by Mindiell's avatar Mindiell 🐍
Browse files

Fixed utf-8 error

parent d9b46fb3
......@@ -23,8 +23,11 @@ class MyHandler(socketserver.BaseRequestHandler):
try:
self.data += self.request.recv(1024)
except TimeoutError:
url = Vlozit().create_paste(str(self.data, "utf-8"))
self.request.sendall(url+b'\n')
try:
url = Vlozit().create_paste(str(self.data, "utf-8"))
self.request.sendall(url+b'\n')
except:
self.request.sendall(b'Error while reading datas.\n')
return
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment