def get_virtual_daemon(exec_method):
 try:
  os = os_detection_exec(exec_method)
 except BaseFrameworkException as w3:
  raise w3
 else:
  if (os == 'windows'):
   om.out.debug('Identified remote OS as Windows, returning winVd object.')
   return winVd(exec_method)
  elif (os == 'linux'):
   om.out.debug('Identified remote OS as Linux, returning lnxVd object.')
   return lnxVd(exec_method)
  else:
   raise BaseFrameworkException(('Failed to get a virtual daemon for the remote OS: ' + os))

def get_virtual_daemon ( exec_method ) : try : os = os_detection_exec ( exec_method ) except BaseFrameworkException as w3 : raise w3 else : if ( os == 'windows' ) : om . out . debug ( 'Identified remote OS as Windows, returning winVd object.' ) return winVd ( exec_method ) elif ( os == 'linux' ) : om . out . debug ( 'Identified remote OS as Linux, returning lnxVd object.' ) return lnxVd ( exec_method ) else : raise BaseFrameworkException ( ( 'Failed to get a virtual daemon for the remote OS: ' + os ) )
uses the exec_method to run remote commands and determine whats the remote os is .