From 2a2f862de404197af07a9bf412d0f6026fd79f66 Mon Sep 17 00:00:00 2001 From: cib Date: Fri, 22 Jun 2012 16:42:54 -0700 Subject: [PATCH] Fixed a few minor errors in the server_controller script --- DLLSocket/server_controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DLLSocket/server_controller.py b/DLLSocket/server_controller.py index 19dd13f7533..89303755cc9 100644 --- a/DLLSocket/server_controller.py +++ b/DLLSocket/server_controller.py @@ -12,6 +12,8 @@ sock.bind( (UDP_IP,UDP_PORT) ) last_ticker_state = None def handle_message(data, addr): + global last_ticker_state + params = urlparse.parse_qs(data) print(data) @@ -30,9 +32,8 @@ def handle_message(data, addr): pass try: - global last_ticker_state if params["type"][0] == "startup" and last_ticker_state: - open("crashlog.txt","a+").write("Server exited, last ticker state was: "+last_ticker_state) + open("crashlog.txt","a+").write("Server exited, last ticker state was: "+last_ticker_state+"\n") except KeyError: pass