示例#1
0
 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()
示例#2
0
 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()
示例#3
0
    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)
示例#4
0
 def onRequestFinish(self, api, request, e):
     data = {
         'cmd': 'login',
         'errorCode': e.getErrorCode(),
         'errorString': MegaError.getErrorString(e.getErrorCode()),
     }
     enviar_cliente(self.webSocket, data)
示例#5
0
 def onRequestTemporaryError(self, api, request, error: MegaError):
     self.listener.onDownloadError(error.toString())
     self.error = error.toString()
     self.continue_event.set()