(self)
Submit transfer for asynchronous handling.
Submit transfer for asynchronous handling.
Submit transfer for asynchronous handling .
def submit(self):
        """
        Submit transfer for asynchronous handling.
        """
        if self.__submitted:
            raise ValueError('Cannot submit a submitted transfer')
        if not self.__initialized:
            raise ValueError('Cannot submit a transfer until it has been '
                'initialized')
        if self.__doomed:
            raise DoomedTransferError('Cannot submit doomed transfer')
        self.__before_submit(self)
        self.__submitted = True
        result = libusb1.libusb_submit_transfer(self.__transfer)
        if result:
            self.__after_completion(self)
            self.__submitted = False
            raise libusb1.USBError(result)
def submit ( self ) : if self . __submitted : raise ValueError ( 'Cannot submit a submitted transfer' ) if not self . __initialized : raise ValueError ( 'Cannot submit a transfer until it has been ' 'initialized' ) if self . __doomed : raise DoomedTransferError ( 'Cannot submit doomed transfer' ) self . __before_submit ( self ) self . __submitted = True result = libusb1 . libusb_submit_transfer ( self . __transfer ) if result : self . __after_completion ( self ) self . __submitted = False raise libusb1 . USBError ( result )