def _random_idx(self):
        if len(self.playlist) < 2:
            return len(self.playlist) - 1
        new_index = self.random_obj.randint(0, len(self.playlist) - 1)
        while new_index == self.current_index:
            new_index = self.random_obj.randint(0, len(self.playlist) - 1)
        return new_index
Only supported on Solaris-like systems
dataset/ETHPy150Open beetbox/beets/beetsplug/bpd/__init__.py/BaseServer._random_idx--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/solaris_system.py/__virtual__