Reformat code with pre-commit
This commit is contained in:
@@ -4,6 +4,7 @@ from utils.logging.log import *
|
||||
|
||||
from core.parser import parseCommand
|
||||
|
||||
|
||||
class Server(Protocol):
|
||||
def __init__(self, addr):
|
||||
self.addr = addr
|
||||
@@ -18,7 +19,7 @@ class Server(Protocol):
|
||||
|
||||
def dataReceived(self, data):
|
||||
data = data.decode("utf-8", "replace")
|
||||
#log("Data received from %s:%s -- %s" % (self.addr.host, self.addr.port, repr(data)))
|
||||
# log("Data received from %s:%s -- %s" % (self.addr.host, self.addr.port, repr(data)))
|
||||
if "\n" in data:
|
||||
splitData = [x for x in data.split("\n") if x]
|
||||
if "\n" in data:
|
||||
@@ -39,6 +40,7 @@ class Server(Protocol):
|
||||
else:
|
||||
warn("Tried to remove a non-existant connection.")
|
||||
|
||||
|
||||
class ServerFactory(Factory):
|
||||
def buildProtocol(self, addr):
|
||||
entry = Server(addr)
|
||||
|
||||
Reference in New Issue
Block a user