'Attempts to detect what bootloader is installed on the system
The result of this method is used in all other calls to grubby,
so that it acts accordingly to the bootloader detected.'

def _set_bootloader(self, bootloader=None):

    if (bootloader is None):
        result = self.get_bootloader()
        if (result is not None):
            self.bootloader = result
    elif (bootloader in self.SUPPORTED_BOOTLOADERS):
        self.bootloader = bootloader
    else:
        raise ValueError(('Bootloader    "%s"    is    not    supported' % bootloader))
