Module: deluge
Branch: 1.3-stable
Commit: b9caa4eeeb659358fb1739a35f2d34538e3231ca

Author: Andrew Resch <[email protected]>
Date:   Fri Sep  3 14:28:16 2010 -0700

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 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/deluge/core/rpcserver.py b/deluge/core/rpcserver.py
index 5e78267..3ef39e8 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

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to