Пример #1
0
 def _set_boot(self, bootloader):
     if bootloader is None:
         xmlh.del_el(self._xml, 'boot')
     else:
         if not isinstance(bootloader, BootloaderConfig):
             raise TypeError('The bootloader has to be \'None\' or an '\
                             'instance of the BootloaderConfig class')
         boot = self._xml.find('boot')
         bootn = bootloader.getxml()
         if boot is not None:
             self._xml.replace(boot, bootn)
         else:
             self._xml.append(bootn)
Пример #2
0
 def _del_boot(self):
     xmlh.del_el(self._xml, 'boot')