in client/securedrop_client/gui/conversation/export/export_wizard.py [0:0]
def request_export(self) -> None:
"""
Handler for "next" button clicks. Start animation and request export.
(The export proceeds only as far as it's able, which is why it's
possible to trigger the same method on every dialog page).
The Preflight QWizardPage triggers the preflight check itself when
it is created, so there is no corresponding `request_export_preflight`
method.
"""
logger.debug("Request export")
# While we're waiting for the results to come back, stay on the same page.
# This prevents the dialog from briefly flashing one page and then
# advancing to a subsequent page (for example, flashing the "Insert a USB"
# page before detecting the USB and advancing to the "Unlock USB" page)
page = self.currentPage()
if isinstance(page, ExportWizardPage):
page.set_complete(False)
self._start_animate_activestate()
# Disable the continue button until the qProcess completes
self.next_button.setEnabled(False)
# Registered fields let us access the passphrase field
# of the PassphraseRequestPage from the wizard parent
passphrase_untrusted = self.field("passphrase")
if str(passphrase_untrusted) is not None:
self.export.export(self.filepaths, str(passphrase_untrusted))
else:
self.export.export(self.filepaths, self.PASS_PLACEHOLDER_FIELD)