A small assert because I'm annoyed with leaking states
[theonering] / src / simple_presence.py
index e5d5973..7cad575 100644 (file)
@@ -32,14 +32,13 @@ class TheOneRingPresence(object):
                """
                raise NotImplementedError()
 
-       @property
-       def handle(self):
+       def Disconnect(self):
                """
                @abstract
                """
-               raise NotImplementedError("Abstract property called")
+               raise NotImplementedError("Abstract function called")
 
-       def Disconnect(self):
+       def handle(self, handleType, handleId):
                """
                @abstract
                """
@@ -57,7 +56,7 @@ class TheOneRingPresence(object):
                                if isDnd:
                                        presence = TheOneRingPresence.HIDDEN
                                else:
-                                       state = self.session.stateMachine.get_state()
+                                       state = self.session.stateMachine.state
                                        if state == state_machine.StateMachine.STATE_ACTIVE:
                                                presence = TheOneRingPresence.ONLINE
                                        elif state == state_machine.StateMachine.STATE_IDLE: