Exemple #1
0
def wait(hang):
    """Wait for asynchronous call on any Context  to finish.
    Wait forever if hang is True.
    
    For finished anynch calls it returns a tuple (status, context):
        status  - status return by asnynchronous call.
        context - context which caused this call to return.
        
    Please read the GPGME manual of more information."""
    ptr = pygpgme.new_gpgme_error_t_p()
    context = pygpgme.gpgme_wait(None, ptr, hang)
    status = pygpgme.gpgme_error_t_p_value(ptr)
    pygpgme.delete_gpgme_error_t_p(ptr)
    if context == None:
        errorcheck(status)
    else:
        context = Context(context)
    return (status, context)
Exemple #2
0
def wait(hang):
    """Wait for asynchronous call on any Context  to finish.
    Wait forever if hang is True.
    
    For finished anynch calls it returns a tuple (status, context):
        status  - status return by asnynchronous call.
        context - context which caused this call to return.
        
    Please read the GPGME manual of more information."""
    ptr = pygpgme.new_gpgme_error_t_p()
    context = pygpgme.gpgme_wait(None, ptr, hang)
    status = pygpgme.gpgme_error_t_p_value(ptr)
    pygpgme.delete_gpgme_error_t_p(ptr)
    if context == None:
        errorcheck(status)
    else:
        context = Context(context)
    return (status, context)
Exemple #3
0
    def wait(self, hang):
        """Wait for asynchronous call to finish. Wait forever if hang is True

        Return:
            On an async call completion its return status.
            On timeout - None.

        Please read the GPGME manual for more information."""
        ptr = pygpgme.new_gpgme_error_t_p()
        context = pygpgme.gpgme_wait(self.wrapped, ptr, hang)
        status = pygpgme.gpgme_error_t_p_value(ptr)
        pygpgme.delete_gpgme_error_t_p(ptr)
        
        if context == None:
            errorcheck(status)
            return None
        else:
            return status
Exemple #4
0
    def wait(self, hang):
        """Wait for asynchronous call to finish. Wait forever if hang is True

        Return:
            On an async call completion its return status.
            On timeout - None.

        Please read the GPGME manual for more information."""
        ptr = pygpgme.new_gpgme_error_t_p()
        context = pygpgme.gpgme_wait(self.wrapped, ptr, hang)
        status = pygpgme.gpgme_error_t_p_value(ptr)
        pygpgme.delete_gpgme_error_t_p(ptr)

        if context == None:
            errorcheck(status)
            return None
        else:
            return status