Пример #1
0
 def check(self,value):
     if value == 'on':
         try:
             imageData = Distributive().getInfo(self.Get('cl_image_filename'))
         except Exception as e:
             raise VariableError(_("Wrong image file"))
         if imageData.get('os_linux_build','') <= \
             self.Get('os_linux_build') or \
             imageData.get('os_linux_build','') <= self.installedBuild():
             raise CommonVariableError(_("The image for update not found"))
Пример #2
0
 def check(self,isoimage):
     """Set image file"""
     imageData = Distributive().getInfo(isoimage)
     if not("os_linux_shortname" in imageData and \
            imageData.get('os_linux_build','') and \
         "os_arch_machine" in imageData):
         raise VariableError(_("Wrong image file"))
Пример #3
0
 def installedBuild(self):
     """
     Get build already installed system
     Need for check update
     """
     imageData = None
     rootDev = self.Get('os_install_root_dev')
     if not rootDev:
         return ""
     try:
         imageData = Distributive().getInfo(rootDev)
         return imageData.get('os_linux_build','')
     except:
         pass
     return ""