diff -r 27e83a8f68d7 -r 08a2d7d67ae5 gmyth-stream/server/main.py --- a/gmyth-stream/server/main.py Tue Apr 03 16:42:04 2007 +0100 +++ b/gmyth-stream/server/main.py Wed Apr 04 17:08:11 2007 +0100 @@ -21,7 +21,7 @@ lib.log("Starting GMyth-Stream server") -while (server.finish == 0): +while (server.finish is 0): con, client = server.getRequest() while True: @@ -31,17 +31,17 @@ lib.log("Received %s from: %s" % (msg, client) ) - if (msg == "SETUP"): + if msg is "SETUP": setup = server.getMsg(1024).strip().split(" ") size = len(setup) options = [] - if ( size < 10 ): + if size < 10: server.sendMsg(lib.log("Wrong SETUP command from: %s" % client[0])) else: - if ( size > 10 ): + if size > 10: i = 10 while (i < size): options.append(setup[i]) @@ -52,21 +52,21 @@ setup[6], setup[7], setup[8], setup[9], options) - if (ret == 0): + if ret is 0: server.Ack("SETUP") else: server.sendMsg(lib.log(ret)) - elif (msg == "PLAY"): + elif msg is "PLAY": media.play() server.Ack("PLAY") - elif (msg == "STOP"): + elif msg is "STOP": media.stop() server.Ack("STOP") - elif (msg == "CLOSE"): + elif msg is "CLOSE": server.finish = 1 media.stop() server.Ack("CLOSE")