增加对judger_token不存在的判断

This commit is contained in:
virusdefender 2016-09-25 14:52:20 +08:00
parent 1c4c5e5fff
commit 2447251ef9

View File

@ -120,6 +120,10 @@ class RPCServer(SocketServer.ThreadingMixIn, SimpleXMLRPCServer):
pass
if not os.environ.get("judger_token"):
print "judger_token not set"
exit(-1)
server = RPCServer(('0.0.0.0', 8080), SimpleXMLRPCRequestHandler, allow_none=True)
server.register_instance(JudgeServer())
server.serve_forever()