(key)
return keylist
Use ``gnupg.GPG.list_keys()`` to display details of the new key.
Use ``gnupg.GPG.list_keys()`` to display details of the new key.
Use gnupg . GPG . list_keys () to display details of the new key .
def displayNewKey(key):
    """Use ``gnupg.GPG.list_keys()`` to display details of the new key."""

    if key.keyring:
        gpg.keyring = key.keyring
    if key.secring:
        gpg.secring = key.secring

    # Using '--fingerprint' twice will display subkey fingerprints too:
    gpg.options = ['--fingerprint', '--fingerprint']
    keylist = gpg.list_keys(secret=True)

    # `result` is a `gnupg._parsers.ListKeys`, which is list-like, so iterate
    # over all the keys and display their info:
    for gpgkey in keylist:
        for k, v in gpgkey.items():
            log.info("%s: %s" % (k.capitalize(), v))

    return keylist
def displayNewKey ( key ) : if key . keyring : gpg . keyring = key . keyring if key . secring : gpg . secring = key . secring # Using '--fingerprint' twice will display subkey fingerprints too: gpg . options = [ '--fingerprint' , '--fingerprint' ] keylist = gpg . list_keys ( secret = True ) # `result` is a `gnupg._parsers.ListKeys`, which is list-like, so iterate # over all the keys and display their info: for gpgkey in keylist : for k , v in gpgkey . items ( ) : log . info ( "%s: %s" % ( k . capitalize ( ) , v ) ) return keylist