Set trusted option to repo if needed

def _set_trusted_option_if_needed(repostr, trusted):
    '''
    Set trusted option to repo if needed
    '''
    if trusted is True:
        repostr += ' [trusted=yes]'
    elif trusted is False:
        repostr += ' [trusted=no]'
    return repostr