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.
This commit is contained in:
Andrew Resch 2010-09-03 14:28:16 -07:00
parent 6c3b216b40
commit b9caa4eeeb
1 changed files with 1 additions and 1 deletions

View File

@ -437,7 +437,7 @@ class RPCServer(component.Component):
""" """
session_id = self.get_session_id() 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] return self.factory.authorized_sessions[session_id][1]
else: else:
# No connections made yet # No connections made yet