From 6b5fb076b0ca11c59d375e39b45e739ec8dde1c6 Mon Sep 17 00:00:00 2001 From: Johann POLEWCZYK Date: Thu, 9 Jan 2025 19:49:10 +0100 Subject: [PATCH] Rename does_view_exist to does_view_exist_in_db --- scripts/artifacts/FacebookMessenger.py | 4 ++-- scripts/ilapfuncs.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/artifacts/FacebookMessenger.py b/scripts/artifacts/FacebookMessenger.py index 55396a30..dcd3ba77 100644 --- a/scripts/artifacts/FacebookMessenger.py +++ b/scripts/artifacts/FacebookMessenger.py @@ -4,7 +4,7 @@ from os.path import basename from scripts.artifact_report import ArtifactHtmlReport -from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, get_next_unused_name, open_sqlite_db_readonly, does_table_exist_in_db, does_view_exist +from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, get_next_unused_name, open_sqlite_db_readonly, does_table_exist_in_db, does_view_exist_in_db def get_FacebookMessenger(files_found, report_folder, seeker, wrap_text, timezone_offset): @@ -13,7 +13,7 @@ def get_FacebookMessenger(files_found, report_folder, seeker, wrap_text, timezon if file_found.endswith('.db'): db = open_sqlite_db_readonly(file_found) - check = does_view_exist(db, 'thread_messages') + check = does_view_exist_in_db(db, 'thread_messages') db = open_sqlite_db_readonly(file_found) diff --git a/scripts/ilapfuncs.py b/scripts/ilapfuncs.py index 965726b6..c7597252 100644 --- a/scripts/ilapfuncs.py +++ b/scripts/ilapfuncs.py @@ -491,7 +491,7 @@ def does_table_exist_in_db(path, table_name): logfunc(f"Query error, query={query} Error={str(ex)}") return False -def does_view_exist(db, table_name): +def does_view_exist_in_db(db, table_name): '''Checks if a table with specified name exists in an sqlite db''' try: query = f"SELECT name FROM sqlite_master WHERE type='view' AND name='{table_name}'"