コード例 #1
0
 def _CreateCache(self, _, features_json):
   extra_path_futures = [self._text_cache.GetFromFile(path)
                         for path in self._extra_paths]
   features = features_utility.Parse(Parse(features_json))
   for path_future in extra_path_futures:
     extra_json = path_future.Get()
     features = features_utility.MergedWith(
         features_utility.Parse(Parse(extra_json)), features)
   return features
コード例 #2
0
 def _CreateCache(self, _, features_json):
     extra_path_futures = [
         self._file_system.ReadSingle(path) for path in self._extra_paths
     ]
     features = features_utility.Parse(Parse(features_json))
     for path_future in extra_path_futures:
         extra_json = path_future.Get()
         features = features_utility.MergedWith(
             features_utility.Parse(Parse(extra_json)), features)
     return features
コード例 #3
0
 def _CreateCache(self, _, features_json):
   extra_path_futures = [self._text_cache.GetFromFile(path)
                         for path in self._extra_paths]
   features = features_utility.Parse(Parse(features_json))
   for path_future in extra_path_futures:
     try:
       extra_json = path_future.Get()
     except FileNotFoundError:
       # Not all file system configurations have the extra files.
       continue
     features = features_utility.MergedWith(
         features_utility.Parse(Parse(extra_json)), features)
   return features