def _stopPacketCaptureCallback(self, result, error=False, context={}, **kwargs): """ Callback for stopping a packet capture. :param result: server response :param error: indicates an error (boolean) """ if error: log.error("error while stopping capture {}: {}".format(self.name(), result["message"])) self.server_error_signal.emit(self.id(), result["message"]) else: PacketCapture.instance().stopCapture(self, context["port"])