Author: andar

Revision: 6140

Log:
        Initialize session_id to -1 so that it will always return something 
even 
if no connections to the daemon have been established

Diff:
Modified: trunk/deluge/core/rpcserver.py
===================================================================
--- trunk/deluge/core/rpcserver.py      2010-01-26 02:01:53 UTC (rev 6139)
+++ trunk/deluge/core/rpcserver.py      2010-01-26 02:42:30 UTC (rev 6140)
@@ -337,6 +337,8 @@
 
         self.factory = Factory()
         self.factory.protocol = DelugeRPCProtocol
+        self.factory.session_id = -1
+        
         # Holds the registered methods
         self.factory.methods = {}
         # Holds the session_ids and auth levels
@@ -416,7 +418,7 @@
         """
         Returns the session id of the current RPC.
         
-        :returns: the session id
+        :returns: the session id, this will be -1 if no connections have been 
made
         :rtype: int
 
         """


-- 
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