def _blkid(fs_type=None):
 flt = (lambda data: [el for el in data if el.strip()])
 data = dict()
 for dev_meta in flt(os.popen('blkid -o full').read().split(os.linesep)):
  dev_meta = dev_meta.strip()
  if (not dev_meta):
   continue
  device = dev_meta.split(' ')
  dev_name = device.pop(0)[:(-1)]
  data[dev_name] = dict()
  for k_set in device:
   (ks_key, ks_value) = [elm.replace('"', '') for elm in k_set.split('=')]
   data[dev_name][ks_key.lower()] = ks_value
 if fs_type:
  mounts = _get_mounts(fs_type)
  for device in six.iterkeys(mounts):
   if data.get(device):
    data[device]['mounts'] = mounts[device]
 return data

def _blkid ( fs_type = None ) : flt = ( lambda data : [ el for el in data if el . strip ( ) ] ) data = dict ( ) for dev_meta in flt ( os . popen ( 'blkid -o full' ) . read ( ) . split ( os . linesep ) ) : dev_meta = dev_meta . strip ( ) if ( not dev_meta ) : continue device = dev_meta . split ( ' ' ) dev_name = device . pop ( 0 ) [ : ( - 1 ) ] data [ dev_name ] = dict ( ) for k_set in device : ( ks_key , ks_value ) = [ elm . replace ( '"' , '' ) for elm in k_set . split ( '=' ) ] data [ dev_name ] [ ks_key . lower ( ) ] = ks_value if fs_type : mounts = _get_mounts ( fs_type ) for device in six . iterkeys ( mounts ) : if data . get ( device ) : data [ device ] [ 'mounts' ] = mounts [ device ] return data
return available media devices .