'Query the Mailpile secrets for a usable passphrase.'

def prepare_passphrase(self, keyid, signing=False, decrypting=False):

    def _use(kid, sps_reader):
        self.passphrase = sps_reader
        GnuPG.LAST_KEY_USED = kid
        return True
    if self.config:
        message = []
        if decrypting:
            message.append(_('Your    PGP    key    is    needed    for    decrypting.'))
        if signing:
            message.append(_('Your    PGP    key    is    needed    for    signing.'))
        (match, sps) = self.config.get_passphrase(keyid, prompt=_('Unlock    your    encryption    key'), description='    '.join(message))
        if match:
            return _use(match, sps.get_reader())
    self.passphrase = None
    return False
