python: Add keylist mode parameter.
* NEWS: Update. * lang/python/gpg/core.py (Context.keylist): Add 'mode' parameter. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
e17ab84129
commit
fdc4e33dc3
1
NEWS
1
NEWS
@ -15,6 +15,7 @@ Noteworthy changes in version 1.8.1 (unreleased)
|
||||
gpgme_data_rewind UN-DEPRECATE.
|
||||
py: Context.__init__ EXTENDED: New keyword argument home_dir.
|
||||
py: Context.home_dir NEW.
|
||||
py: Context.keylist EXTENDED: New keyword argument mode.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.8.0 (2016-11-16)
|
||||
|
@ -483,12 +483,14 @@ class Context(GpgmeWrapper):
|
||||
plainbytes = data.read()
|
||||
return plainbytes, result
|
||||
|
||||
def keylist(self, pattern=None, secret=False):
|
||||
def keylist(self, pattern=None, secret=False,
|
||||
mode=constants.keylist.mode.LOCAL):
|
||||
"""List keys
|
||||
|
||||
Keyword arguments:
|
||||
pattern -- return keys matching pattern (default: all keys)
|
||||
secret -- return only secret keys
|
||||
secret -- return only secret keys (default: False)
|
||||
mode -- keylist mode (default: list local keys)
|
||||
|
||||
Returns:
|
||||
-- an iterator returning key objects
|
||||
@ -496,6 +498,7 @@ class Context(GpgmeWrapper):
|
||||
Raises:
|
||||
GPGMEError -- as signaled by the underlying library
|
||||
"""
|
||||
self.set_keylist_mode(mode)
|
||||
return self.op_keylist_all(pattern, secret)
|
||||
|
||||
def assuan_transact(self, command,
|
||||
|
Loading…
Reference in New Issue
Block a user