[Pkg-gnupg-commit] [gpgme] 69/132: python: Add keylist mode parameter.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Apr 26 01:01:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gpgme.
commit fdc4e33dc3f6c84fe9d7bf9795c603ae3cf5f28d
Author: Justus Winter <justus at g10code.com>
Date: Tue Feb 14 15:56:41 2017 +0100
python: Add keylist mode parameter.
* NEWS: Update.
* lang/python/gpg/core.py (Context.keylist): Add 'mode' parameter.
Signed-off-by: Justus Winter <justus at g10code.com>
---
NEWS | 1 +
lang/python/gpg/core.py | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 7ec3dfb..125d54e 100644
--- a/NEWS
+++ b/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)
diff --git a/lang/python/gpg/core.py b/lang/python/gpg/core.py
index 79d1f53..e07ec33 100644
--- a/lang/python/gpg/core.py
+++ b/lang/python/gpg/core.py
@@ -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,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list