def _find_hash_fn(hash):
 try:
  (dldir, urlmapfn) = _get_download_cache_locs()
 except (IOError, OSError) as e:
  msg = u'Could not access cache directory to search for data file: '
  warn(CacheMissingWarning((msg + str(e))))
  return None
 hashfn = os.path.join(dldir, hash)
 if os.path.isfile(hashfn):
  return hashfn
 else:
  return None

def _find_hash_fn ( hash ) : try : ( dldir , urlmapfn ) = _get_download_cache_locs ( ) except ( IOError , OSError ) as e : msg = u'Could not access cache directory to search for data file: ' warn ( CacheMissingWarning ( ( msg + str ( e ) ) ) ) return None hashfn = os . path . join ( dldir , hash ) if os . path . isfile ( hashfn ) : return hashfn else : return None
looks for a local file by hash - returns file name if found and a valid file .