[#2964] Fix TypeError when checking auth level in RPC Server

- self.factory.authorized_sessions requires tuple of (int, string).
This commit is contained in:
Calum Lind 2017-02-20 09:43:43 +00:00
parent b52de1549e
commit 1dc4c465c7

View file

@ -204,8 +204,8 @@ class DelugeRPCProtocol(Protocol):
"""
peer = self.transport.getPeer()
log.info("Deluge Client connection made from: %s:%s", peer.host, peer.port)
# Set the initial auth level of this session to AUTH_LEVEL_NONE
self.factory.authorized_sessions[self.transport.sessionno] = AUTH_LEVEL_NONE
# Set the initial auth level of this session to AUTH_LEVEL_NONE and empty username.
self.factory.authorized_sessions[self.transport.sessionno] = (AUTH_LEVEL_NONE, "")
def connectionLost(self, reason):
"""