mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-23 12:58:58 +00:00
Renamed function for consistency
This commit is contained in:
parent
fdaf2fc760
commit
6af6c52f60
|
@ -107,7 +107,7 @@ class IOSExtraction(MVTModule):
|
|||
|
||||
return None
|
||||
|
||||
def _find_fs_files_from_pattern(self, root_paths):
|
||||
def _get_fs_files_from_pattern(self, root_paths):
|
||||
for root_path in root_paths:
|
||||
for found_path in glob.glob(os.path.join(self.base_folder, root_path)):
|
||||
if not os.path.exists(found_path):
|
||||
|
|
|
@ -32,7 +32,7 @@ class IOSVersionHistory(IOSExtraction):
|
|||
}
|
||||
|
||||
def run(self):
|
||||
for found_path in self._find_fs_files_from_pattern(IOS_ANALYTICS_JOURNAL_PATHS):
|
||||
for found_path in self._get_fs_files_from_pattern(IOS_ANALYTICS_JOURNAL_PATHS):
|
||||
with open(found_path, "r") as analytics_log:
|
||||
log_line = json.loads(analytics_log.readline().strip())
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class WebkitBase(IOSExtraction):
|
|||
self.detected.append(item)
|
||||
|
||||
def _process_webkit_folder(self, root_paths):
|
||||
for found_path in self._find_fs_files_from_pattern(root_paths):
|
||||
for found_path in self._get_fs_files_from_pattern(root_paths):
|
||||
key = os.path.relpath(found_path, self.base_folder)
|
||||
|
||||
for name in os.listdir(found_path):
|
||||
|
|
|
@ -83,5 +83,5 @@ class WebkitResourceLoadStatistics(IOSExtraction):
|
|||
except Exception as e:
|
||||
self.log.info("Unable to search for WebKit observations.db: %s", e)
|
||||
elif self.is_fs_dump:
|
||||
for db_path in self._find_fs_files_from_pattern(WEBKIT_RESOURCELOADSTATICS_ROOT_PATHS):
|
||||
for db_path in self._get_fs_files_from_pattern(WEBKIT_RESOURCELOADSTATICS_ROOT_PATHS):
|
||||
self._process_observations_db(db_path=db_path, key=os.path.relpath(db_path, self.base_folder))
|
||||
|
|
|
@ -117,7 +117,7 @@ class WebkitSessionResourceLog(IOSExtraction):
|
|||
self.results[self.file_path] = self._extract_browsing_stats(self.file_path)
|
||||
return
|
||||
|
||||
for log_file in self._find_fs_files_from_pattern(WEBKIT_RESOURCELOADSTATICS_ROOT_PATHS):
|
||||
for log_file in self._get_fs_files_from_pattern(WEBKIT_RESOURCELOADSTATICS_ROOT_PATHS):
|
||||
self.log.info("Found Safari browsing session resource log at path: %s", log_file)
|
||||
key = os.path.relpath(log_file, self.base_folder)
|
||||
self.results[key] = self._extract_browsing_stats(log_file)
|
||||
|
|
Loading…
Reference in New Issue
Block a user