def onRequestTemporaryError(self, api, request, error: MegaError): LOGGER.error(f'Mega Request error in {error}') if not self.is_cancelled: self.is_cancelled = True self.listener.onDownloadError("RequestTempError: " + error.toString()) self.error = error.toString() self.continue_event.set()
def onRequestFinish( self, api: mega.MegaApi, request: mega.MegaRequest, e: mega.MegaError, ): print(f'{self.prefix} onRequestFinish {request} {e}') if e and e.getValue() != e.API_OK: self.error = e self.event.set()
def onRequestFinish( self, api: mega.MegaApi, request: mega.MegaRequest, e: mega.MegaError, ): if e is None or e.getValue() == e.API_OK: self.public_node = request.getPublicMegaNode() super().onRequestFinish(api, request, e)
def onRequestFinish(self, api, request, e): data = { 'cmd': 'login', 'errorCode': e.getErrorCode(), 'errorString': MegaError.getErrorString(e.getErrorCode()), } enviar_cliente(self.webSocket, data)
def onRequestTemporaryError(self, api, request, error: MegaError): self.listener.onDownloadError(error.toString()) self.error = error.toString() self.continue_event.set()