diff --git a/.pylintrc b/.pylintrc index 42b589b82..cb7eadf16 100644 --- a/.pylintrc +++ b/.pylintrc @@ -69,7 +69,7 @@ disable=missing-docstring, invalid-name, old-style-class, bad-continuation, wron R, unused-argument, fixme, protected-access, import-error, unused-variable, global-statement, attribute-defined-outside-init, arguments-differ, - no-init, non-parent-init-called, super-init-not-called, signature-differs, + no-init, non-parent-init-called, super-init-not-called, broad-except, pointless-except [REPORTS] diff --git a/deluge/core/rpcserver.py b/deluge/core/rpcserver.py index 3015e20e0..3981fc957 100644 --- a/deluge/core/rpcserver.py +++ b/deluge/core/rpcserver.py @@ -18,7 +18,7 @@ from types import FunctionType from OpenSSL import SSL, crypto from twisted.internet import defer, reactor -from twisted.internet.protocol import Factory +from twisted.internet.protocol import Factory, connectionDone import deluge.component as component import deluge.configmanager @@ -159,7 +159,7 @@ class DelugeRPCProtocol(DelugeTransferProtocol): # Set the initial auth level of this session to AUTH_LEVEL_NONE self.factory.authorized_sessions[self.transport.sessionno] = AUTH_LEVEL_NONE - def connectionLost(self, reason): # NOQA + def connectionLost(self, reason=connectionDone): # NOQA """ This method is called when the client is disconnected. diff --git a/deluge/ui/gtkui/ipcinterface.py b/deluge/ui/gtkui/ipcinterface.py index 4087bf345..c18816244 100644 --- a/deluge/ui/gtkui/ipcinterface.py +++ b/deluge/ui/gtkui/ipcinterface.py @@ -18,7 +18,7 @@ from urlparse import urlparse import twisted.internet.error from twisted.internet import reactor -from twisted.internet.protocol import ClientFactory, Factory, Protocol +from twisted.internet.protocol import ClientFactory, Factory, Protocol, connectionDone import deluge.component as component from deluge.common import decode_string, is_magnet, is_url, windows_check @@ -55,7 +55,7 @@ class IPCProtocolClient(Protocol): self.transport.write(rencode.dumps(self.factory.args)) self.transport.loseConnection() - def connectionLost(self, reason): # NOQA + def connectionLost(self, reason=connectionDone): # NOQA reactor.stop() self.factory.stop = True