def select_gpg_key():
    print('Here are the available GPG keys:')
    available_keys = cmd_output('gpg --list-secret-keys')
    print(available_keys)
    key_name = raw_input('Which user name (enter the user name without email address): ')
    if (key_name not in available_keys):
        fail("Couldn't find the requested key.")
    return key_name
def select_gpg_key():
    print('Here are the available GPG keys:')
    available_keys = cmd_output('gpg --list-secret-keys')
    print(available_keys)
    key_name = raw_input('Which user name (enter the user name without email address): ')
    if (key_name not in available_keys):
        fail("Couldn't find the requested key.")
    return key_name