def set_virt_cpus(self, num):
 if ((num == '') or (num is None)):
  self.virt_cpus = 1
  return
 if (num == '<<inherit>>'):
  self.virt_cpus = '<<inherit>>'
  return
 try:
  num = int(str(num))
 except:
  raise CX(_(('invalid number of virtual CPUs (%s)' % num)))
 self.virt_cpus = num

def set_virt_cpus ( self , num ) : if ( ( num == '' ) or ( num is None ) ) : self . virt_cpus = 1 return if ( num == '<<inherit>>' ) : self . virt_cpus = '<<inherit>>' return try : num = int ( str ( num ) ) except : raise CX ( _ ( ( 'invalid number of virtual CPUs (%s)' % num ) ) ) self . virt_cpus = num
for virt only .