'Return the closest kernel ver in the list that is <= kver unless
kver is the lowest, in which case return the lowest in klist.'

@classmethod
def _closest_kver_leq(cls, klist, kver):

    if (kver in klist):
        return kver
    l = list(klist)
    l.append(kver)
    l.sort(cmp=cls._kver_cmp)
    i = l.index(kver)
    if (i == 0):
        return l[1]
    return l[(i - 1)]
