def list_downloads():
 outfiles = []
 for (root, subFolder, files) in os.walk('/Library/Updates'):
  for f in files:
   outfiles.append(os.path.join(root, f))
 dist_files = []
 for f in outfiles:
  if f.endswith('.dist'):
   dist_files.append(f)
 ret = []
 for update in _get_available():
  for f in dist_files:
   with salt.utils.fopen(f) as fhr:
    if (update.rsplit('-', 1)[0] in fhr.read()):
     ret.append(update)
 return ret

def list_downloads ( ) : outfiles = [ ] for ( root , subFolder , files ) in os . walk ( '/Library/Updates' ) : for f in files : outfiles . append ( os . path . join ( root , f ) ) dist_files = [ ] for f in outfiles : if f . endswith ( '.dist' ) : dist_files . append ( f ) ret = [ ] for update in _get_available ( ) : for f in dist_files : with salt . utils . fopen ( f ) as fhr : if ( update . rsplit ( '-' , 1 ) [ 0 ] in fhr . read ( ) ) : ret . append ( update ) return ret
return a list of all updates that have been downloaded locally .