From b9caa4eeeb659358fb1739a35f2d34538e3231ca Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 3 Sep 2010 14:28:16 -0700 Subject: [PATCH] Fix issue when adding torrents without a 'session'. This can happen when a plugin adds a torrent, like how the AutoAdd plugin works. The user that adds this torrent will be an empty string. --- deluge/core/rpcserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/rpcserver.py b/deluge/core/rpcserver.py index 5e78267b8..3ef39e80a 100644 --- a/deluge/core/rpcserver.py +++ b/deluge/core/rpcserver.py @@ -437,7 +437,7 @@ class RPCServer(component.Component): """ session_id = self.get_session_id() - if session_id > -1: + if session_id > -1 and session_id in self.factory.authorized_sessions: return self.factory.authorized_sessions[session_id][1] else: # No connections made yet