def set_virt_ram(self, num):
 if (num == '<<inherit>>'):
  self.virt_ram = '<<inherit>>'
  return
 try:
  inum = int(num)
  if (inum != float(num)):
   raise CX(_(('invalid virt ram size (%s)' % num)))
  if (inum >= 0):
   self.virt_ram = inum
   return
  raise CX(_(('invalid virt ram size (%s)' % num)))
 except:
  raise CX(_(('invalid virt ram size (%s)' % num)))

def set_virt_ram ( self , num ) : if ( num == '<<inherit>>' ) : self . virt_ram = '<<inherit>>' return try : inum = int ( num ) if ( inum != float ( num ) ) : raise CX ( _ ( ( 'invalid virt ram size (%s)' % num ) ) ) if ( inum >= 0 ) : self . virt_ram = inum return raise CX ( _ ( ( 'invalid virt ram size (%s)' % num ) ) ) except : raise CX ( _ ( ( 'invalid virt ram size (%s)' % num ) ) )
for virt only .