

def apt_key_exists(keyid):
    '\n    Check if the given key id exists in apt keyring.\n    '
    gpg_cmd = 'gpg --ignore-time-conflict --no-options --no-default-keyring --keyring /etc/apt/trusted.gpg'
    with settings(hide('everything'), warn_only=True):
        res = run(('%(gpg_cmd)s --fingerprint %(keyid)s' % locals()))
    return res.succeeded

dataset/ETHPy150Open ronnix/fabtools/fabtools/deb.py apt_key_exists/original