summaryrefslogtreecommitdiff
path: root/alot/crypto.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-07-14 11:21:21 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-07-15 15:01:51 -0700
commit7419687e0a8b882c84e75e7578f4b947d384d413 (patch)
tree42f013545c0758aa0e5d9cdd94d3c39640678b22 /alot/crypto.py
parentf1e55cd6902be34c2feacc20443e4d716387c838 (diff)
crypto: Fix list_keys docstring
There are currently several problems with this docstring: 1) it says the return type is list, but it's actually an iterator 2) it says the first parameter is keyid, but it's hint 3) no types are specified. This patch corrects that.
Diffstat (limited to 'alot/crypto.py')
-rw-r--r--alot/crypto.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/alot/crypto.py b/alot/crypto.py
index 2d67c115..4da32eea 100644
--- a/alot/crypto.py
+++ b/alot/crypto.py
@@ -134,11 +134,14 @@ def get_key(keyid, validate=False, encrypt=False, sign=False,
def list_keys(hint=None, private=False):
"""
- Returns a list of all keys containing keyid.
-
- :param keyid: The part we search for
- :param private: Whether secret keys are listed
- :rtype: list
+ Returns a iterator of all keys containing the fingerprint, or all keys if
+ hint is None.
+
+ :param hint: Part of a fingerprint to usee to search
+ :type hint: str or None
+ :param private: Whether to return public keys or secret keys
+ :type private: bool
+ :rtype: :class:`gpgme.KeyIter`
"""
ctx = gpgme.Context()
return ctx.keylist(hint, private)