def get_domain_info(libvirt, host, virt_dom):
 def is_race(e):
  code = e.get_error_code()
  message = e.get_error_message()
  return ((code == libvirt.VIR_ERR_OPERATION_FAILED) and ('cannot read cputime for domain' in message))
 try:
  return virt_dom.info()
 except libvirt.libvirtError as e:
  if ((not host.has_min_version((1, 2, 11))) and is_race(e)):
   LOG.warning(_LW('Race detected in libvirt.virDomain.info, trying one more time'))
   return virt_dom.info()
  raise

def get_domain_info ( libvirt , host , virt_dom ) : def is_race ( e ) : code = e . get_error_code ( ) message = e . get_error_message ( ) return ( ( code == libvirt . VIR_ERR_OPERATION_FAILED ) and ( 'cannot read cputime for domain' in message ) ) try : return virt_dom . info ( ) except libvirt . libvirtError as e : if ( ( not host . has_min_version ( ( 1 , 2 , 11 ) ) ) and is_race ( e ) ) : LOG . warning ( _LW ( 'Race detected in libvirt.virDomain.info, trying one more time' ) ) return virt_dom . info ( ) raise
method virdomain .