def _release_info():
 blacklisted = ['ANSI_COLOR=', 'HOME_URL=', 'SUPPORT_URL=', 'BUG_REPORT_URL=']
 data = []
 for fn in glob.glob('/etc/*-release'):
  lines = []
  try:
   with open(fn, 'r', encoding='utf-8') as f:
    for line in f.read().strip().splitlines():
     if (not any((line.startswith(bl) for bl in blacklisted))):
      lines.append(line)
    if lines:
     data.append((fn, '\n'.join(lines)))
  except OSError:
   log.misc.exception('Error while reading {}.'.format(fn))
 return data

def _release_info ( ) : blacklisted = [ 'ANSI_COLOR=' , 'HOME_URL=' , 'SUPPORT_URL=' , 'BUG_REPORT_URL=' ] data = [ ] for fn in glob . glob ( '/etc/*-release' ) : lines = [ ] try : with open ( fn , 'r' , encoding = 'utf-8' ) as f : for line in f . read ( ) . strip ( ) . splitlines ( ) : if ( not any ( ( line . startswith ( bl ) for bl in blacklisted ) ) ) : lines . append ( line ) if lines : data . append ( ( fn , '\n' . join ( lines ) ) ) except OSError : log . misc . exception ( 'Error while reading {}.' . format ( fn ) ) return data
try to gather distribution release informations .