diff options
Diffstat (limited to 'alot/commands/utils.py')
-rw-r--r-- | alot/commands/utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/alot/commands/utils.py b/alot/commands/utils.py index a6290671..5ac8a74c 100644 --- a/alot/commands/utils.py +++ b/alot/commands/utils.py @@ -9,6 +9,20 @@ from alot import crypto @inlineCallbacks def get_keys(ui, encrypt_keyids, block_error=False): + """Get several keys from the GPG keyring. The keys are selected by keyid + and are checked if they can be used for encryption. + + :param ui: the main user interface object + :type ui: alot.ui.UI + :param encrypt_keyids: the key ids of the keys to get + :type encrypt_keyids: list(str) + :param block_error: wether error messages for the user should expire + automatically or block the ui + :type block_error: bool + :returns: the available keys indexed by their key hash + :rtype: dict(str->gpgme.Key) + + """ keys = {} for keyid in encrypt_keyids: try: |