def get_os_vendor():
 logging.warn('utils.get_os_vendor() is deprecated, please use autotest.client.shared.distro.detect() instead')
 vendor = 'Unknown'
 if os.path.isfile('/etc/SuSE-release'):
  return 'SUSE'
 issue = '/etc/issue'
 if (not os.path.isfile(issue)):
  return vendor
 if file_contains_pattern(issue, 'Red Hat'):
  vendor = 'Red Hat'
 if file_contains_pattern(issue, 'CentOS'):
  vendor = 'Red Hat'
 elif file_contains_pattern(issue, 'Fedora'):
  vendor = 'Fedora'
 elif file_contains_pattern(issue, 'SUSE'):
  vendor = 'SUSE'
 elif file_contains_pattern(issue, 'Ubuntu'):
  vendor = 'Ubuntu'
 elif file_contains_pattern(issue, 'Debian'):
  vendor = 'Debian'
 logging.debug('Detected OS vendor: %s', vendor)
 return vendor

def get_os_vendor ( ) : logging . warn ( 'utils.get_os_vendor() is deprecated, please use autotest.client.shared.distro.detect() instead' ) vendor = 'Unknown' if os . path . isfile ( '/etc/SuSE-release' ) : return 'SUSE' issue = '/etc/issue' if ( not os . path . isfile ( issue ) ) : return vendor if file_contains_pattern ( issue , 'Red Hat' ) : vendor = 'Red Hat' if file_contains_pattern ( issue , 'CentOS' ) : vendor = 'Red Hat' elif file_contains_pattern ( issue , 'Fedora' ) : vendor = 'Fedora' elif file_contains_pattern ( issue , 'SUSE' ) : vendor = 'SUSE' elif file_contains_pattern ( issue , 'Ubuntu' ) : vendor = 'Ubuntu' elif file_contains_pattern ( issue , 'Debian' ) : vendor = 'Debian' logging . debug ( 'Detected OS vendor: %s' , vendor ) return vendor
try to guess whats the os vendor .