Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::application::pidgin::pidgin::Pidgin::wait_for_buddy (   self,
  alias,
  timeout = 15 
)

It waits for a buddy to be connected.
A timeout value can be passed, being default 15secs.

It raises an exception if the timeout expires.

@type alias: string 
@param alias: The name of the buddy to wait to be available
@type timeout: integer
@param timeout: Number of seconds to wait for the buddy to be connected (default:15s)

Definition at line 228 of file pidgin.py.

00228                                                :
        """
        It waits for a buddy to be connected.
        A timeout value can be passed, being default 15secs.

        It raises an exception if the timeout expires.

        @type alias: string 
        @param alias: The name of the buddy to wait to be available
        @type timeout: integer
        @param timeout: Number of seconds to wait for the buddy to be connected (default:15s)
        """
        starttime = time()
        while not self.buddy_available(alias):
            if time() - starttime >= timeout:
                raise Exception('waiting for buddy timed out')
            sleep(1)

    def send_message(self, alias, msg):


Generated by  Doxygen 1.6.0   Back to index