def get_os_info_ua(filepath='/etc/os-release'):
 if os.path.isfile(filepath):
  os_ua = _get_systemd_os_release_var('PRETTY_NAME', filepath=filepath)
  if (not os_ua):
   os_ua = _get_systemd_os_release_var('NAME', filepath=filepath)
  if os_ua:
   return os_ua
 return ' '.join(get_python_os_info())

def get_os_info_ua ( filepath = '/etc/os-release' ) : if os . path . isfile ( filepath ) : os_ua = _get_systemd_os_release_var ( 'PRETTY_NAME' , filepath = filepath ) if ( not os_ua ) : os_ua = _get_systemd_os_release_var ( 'NAME' , filepath = filepath ) if os_ua : return os_ua return ' ' . join ( get_python_os_info ( ) )
get os name and version string for user agent .