def _getDefaultPublicKeyrings():
    publicKeyrings = []
    # If we are root, don't use the keyring in $HOME, since a process started
    # under sudo will have $HOME set to the old user's (CNY-2630)

    # CNY-2722: look up the directory with getpwuid, instead of using $HOME

    try:
        import pwd
        ent = pwd.getpwuid(os.getuid())
        pwDir = ent[5]
        # If home dir doesn't exist, don't bother
        if os.path.isdir(pwDir):
            publicKeyrings.append(os.path.join(pwDir, '.gnupg', 'pubring.gpg'))
    except __HOLE__:
        pass

    publicKeyrings.append('/etc/conary/pubring.gpg')
    return publicKeyrings
dataset/ETHPy150Open sassoftware/conary/conary/conarycfg.py/_getDefaultPublicKeyrings