1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-23 22:55:23 +00:00

correct except error

This commit is contained in:
catborise 2020-01-24 10:07:45 +03:00
parent b768dbf59d
commit 39b53dbfc7

View file

@ -51,8 +51,9 @@ class MyTCPServerHandler(SocketServer.BaseRequestHandler):
pass
gfs.shutdown()
gfs.close()
except RuntimeError, err:
except RuntimeError as err:
self.request.sendall(json.dumps({'return': 'error', 'message': err.message}))
server = MyTCPServer((ADDRESS, PORT), MyTCPServerHandler)
server.serve_forever()