in client/securedrop_client/export.py [0:0]
def _on_print_preflight_complete(self) -> None:
"""
Print preflight completion callback.
"""
self._cleanup_tmpdir()
status = None
try:
status = self._parse_status_from_qprocess(self.process)
# We aren't using export_state_changed yet for print, so
# parse the status and send either the `failed` or `succeeded` signal
except ExportError:
logger.error("Export preflight returned unexpected value")
self.print_preflight_check_failed.emit(ExportStatus.UNEXPECTED_RETURN_STATUS)
return
if status == ExportStatus.PRINT_PREFLIGHT_SUCCESS:
logger.debug("Print preflight success")
self.print_preflight_check_succeeded.emit(status)
else:
logger.debug(f"Print preflight failure ({status.value})")
self.print_preflight_check_failed.emit(status)