mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-28 17:00:23 +00:00
Remmoved prints from protocol classes
This commit is contained in:
parent
9b2b8d383e
commit
22b426a5ea
@ -23,19 +23,10 @@ class JSONCommandProtocol(LineReceiver):
|
|||||||
else:
|
else:
|
||||||
self.dropWithError(getMessage("en", "unknown-command-server-error").format(message[1])) #TODO: log, not drop
|
self.dropWithError(getMessage("en", "unknown-command-server-error").format(message[1])) #TODO: log, not drop
|
||||||
|
|
||||||
def printReceived(self, line): #TODO: remove
|
|
||||||
#print ">>i", line
|
|
||||||
pass
|
|
||||||
|
|
||||||
def printSent(self, line):
|
|
||||||
#print "o<<", line
|
|
||||||
pass
|
|
||||||
|
|
||||||
def lineReceived(self, line):
|
def lineReceived(self, line):
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if not line:
|
if not line:
|
||||||
return
|
return
|
||||||
self.printReceived(line)
|
|
||||||
try:
|
try:
|
||||||
messages = json.loads(line)
|
messages = json.loads(line)
|
||||||
except:
|
except:
|
||||||
@ -49,7 +40,6 @@ class JSONCommandProtocol(LineReceiver):
|
|||||||
|
|
||||||
def sendMessage(self, dict_):
|
def sendMessage(self, dict_):
|
||||||
line = json.dumps(dict_)
|
line = json.dumps(dict_)
|
||||||
self.printSent(line)
|
|
||||||
self.sendLine(line)
|
self.sendLine(line)
|
||||||
|
|
||||||
def drop(self):
|
def drop(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user