(key)
Trust given GPG public key.

    key is a GPG public key (bytes) that can be passed to apt-key add via stdin.
Trust given GPG public key.
Trust given GPG public key .
def trust_gpg_key(key):
    """
    Trust given GPG public key.

    key is a GPG public key (bytes) that can be passed to apt-key add via stdin.
    """
    # If gpg2 doesn't exist, install it.
    if not os.path.exists("/usr/bin/gpg2"):
        install_packages(["gnupg2"])
    utils.run_subprocess(["apt-key", "add", "-"], input=key)
def trust_gpg_key ( key ) : # If gpg2 doesn't exist, install it. if not os . path . exists ( "/usr/bin/gpg2" ) : install_packages ( [ "gnupg2" ] ) utils . run_subprocess ( [ "apt-key" , "add" , "-" ] , input = key )